Bug 426374

Summary: Unable to start KDEConnect on Android Desktop / Samsung DeX
Product: [Applications] kdeconnect Reporter: Alexander Adam <bugs.kde.1933>
Component: android-applicationAssignee: Albert Vaca Cintora <albertvaka>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Android   
OS: Android 10.x   
Latest Commit: Version Fixed In:
Attachments: Screenshot of the error message notification

Description Alexander Adam 2020-09-10 14:57:34 UTC
Created attachment 131541 [details]
Screenshot of the error message notification

I'm using version 1.14.2 from F-Droid but the version selector only has versions till 1.10. Therefore I selected 'unspecified'.

SUMMARY

When I try to start KDE Connect within the Samsund Desktop Environment (DeX) I'm getting the error "KDE Connect can't run in Samsung DeX".
All apps except KDE Connect and another (KeePassDX - https://github.com/Kunzisoft/KeePassDX/issues/245#issuecomment-662502660) are running fine.


STEPS TO REPRODUCE
1. Try to start KDE Connect within an Android Desktop environment (Samsung DeX)

OBSERVED RESULT

error "KDE Connect can't run in Samsung DeX"

EXPECTED RESULT

KDE Connect starts

SOFTWARE/OS VERSIONS
Android 10 on Samsung Galaxy Tab S6 (but I'm sure any other DeX compatible device will also be suitable to reproduce this)

ADDITIONAL INFORMATION

I'm using Samsung DeX (https://www.samsung.com/us/explore/dex/), which gives a desktop like experience and makes use of Android windowing support.

Samsung has documentation on how to enable window resizing for Android applications (https://developer.samsung.com/samsung-dex/modify-optimizing.html):

```xml
<application
    android:resizeableActivity="true">
</application>
```

This documentation also has more tweaks and information on how to improve the desktop experience in case you're interested.
They also have an app testing guide (https://developer.samsung.com/samsung-dex/testing.html — although some apps are fine with this guide but won't work on "real" DeX sometimes).

Other applications only had the issue that apps weren't resizeable — for instance AntennaPod ( https://github.com/AntennaPod/AntennaPod/pull/4343/files ), NewPipe ( https://github.com/TobiGr/NewPipe/commit/ea486e769ff9728c4e5d7dac6028587c39476fa9 ) or GitNex ( https://codeberg.org/gitnex/GitNex/pulls/601/files ).
But at least it was possible to start them.

My guess is, that this might be a metadata issue as well but I'm not an Android developer.

I'm happy to test something if you have an APK and I will try to respond as soon as possible if you have any further questions.
Comment 1 Alexander Adam 2020-09-17 11:09:47 UTC
In the case of 1Password the reason was the Input Method Service / Soft Keyboard [1].
But they didn't tell how they solved the issue with the Input Method Service.

[1] https://twitter.com/michaelverde/status/1305658074716274688
Comment 2 Alexander Adam 2020-12-04 10:02:31 UTC
I got a response from Samsung support and they wrote:

> 3rd-party keyboard is not allowed in Samsung DeX, so following permission will block the app in DeX.
> 
> android:permission="android.permission.BIND_INPUT_METHOD"

This would correspond to this line:

https://github.com/KDE/kdeconnect-android/blob/b107c3d37c5771c5c7729a27100e987c44394b77/AndroidManifest.xml#L79

But sadly they didn't write how to solve this properly.
Comment 3 Alexander Adam 2020-12-04 10:10:19 UTC
Sorry, I forgot the link to the response from Samsung and of course Bugzilla doesn't seem to allow editing messages:

https://forum.developer.samsung.com/t/app-is-not-starting-in-dex-with-bind-input-method-permission/8822/2?u=alexanderadam
Comment 4 Alexander Adam 2021-09-25 12:51:13 UTC
Appearantly someone found a way to solve this and fixed it for KeePassDX:

https://github.com/Kunzisoft/KeePassDX/pull/1114

Maybe this could also be a solution for KDEConnect?