## Summary
A basic mouse receiver implementation. You can now control your Android Device remotely which might be useful when it's connected to a bigger screen (via HDMI).
Unfortunately Android does not provide moving mouse by software (other than adb and without root). Therefore this implementation uses Android [AccessibilityService](https://developer.android.com/reference/android/accessibilityservice/AccessibilityService) to create an ImageView Overlay as mouse pointer and simulate touch gestures.
This is quite hacky but I think the best way to do so.
## Demo
Here is a small demo

Adds new functionality to the MousepadPlugin to accept data via Intent and pass them on to the host as keystrokes via the existing MousePadPlugin.PACKET_TYPE_MOUSEPAD_REQUEST PackageType
eg. to easily send OTP codes from the phone to the Desktop
Summary:
So from android 8 onwards it appears that fetching content from "cleartext" urls is disabled by default
https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted
I have a mpris service running on my local computer which is connected to the android, that service is also serving cover art for currently playing song. Obviously I can not have a domain set for my computer on a local machine, so cover art urls look like
`http://<ip>:<port>/<songid>.ext` . Since this restriction was introduced into android 8, kde connect is not able to fetch the art from this url.
This is patch allows connections to raw IPs addresses as well. If there is any security issues regarding this change, I'm prepared to do more work, my suggestion would be to check if IP address in this case matches paired computer's IP address, although this would still be a bit annoying (especially since whatever malicious file can be served from a "cleartext" link as well).
Test Plan:
- start some sort of server which can serve an image on a paired computer
- create mpris Player instance on a paired computer and set the `mpris:artUrl` to the served address where this image is available
- open kde connect android app, select prepared player and see default cover art instead of the served image
- change artUrl to some image from the web
- check in kde connect again and see it correctly show a remote image
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, nicolasfella, albertvaka
Subscribers: albertvaka, nicolasfella, andyholmes, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D21247
Summary:
Use Storage Access Framework on Android running SDK >= 21 so writing to
sdcard will work again
|{F6546802}|{F6546803}|{F6546804}|
|API 21+|API 19-|Edit|
Test Plan:
Install patch on Android phone with Build.Version < 19 (Kitkat)
- Without a sdcard: Verify that dolphin displays an "All Files" entry that is empty
- With a sdcard and with "Add camera folder shortcut" turned off: Verify that dolphin displays the configured display name of the sdcard
- With a sdcard and with "Add camera folder shortcut" turned on: Verify that dolphin displays the configured display name of the sdcard and also lists a "Camera pictures" shortcut
- With a sdcard: Verify that when changing the display name or the "Add camera folder shortcut" preference dolphin displays the updated items (after pressing F5)
- With a sdcard: Verify that files can be read and written to/from the sdcard
Install patch on Android phone with Build.Version < 19 (Kitkat)
- Repeat the above tests except for the read/write test: Verify that files can be read from the sdcard
Install patch on Android phone with Build.Version > 21 (Lollipop)
- Without any configured storage locations: Verify dolphin displays an "All Files" entry that is empty
- With configured storage locations: Verify dolphin displays the display names of the configured storage locations and that entering a location displays the correct directory entries
- Make one or several changes to the configured storage locations: Verify dolphin displays the display names of the configured storage locations (after pressing F5) and that entering a location displays the correct directory entries
Reviewers: #kde_connect, albertvaka, sredman
Reviewed By: #kde_connect, albertvaka, sredman
Subscribers: albertvaka, sredman, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D18212
Summary: When a request arrive open the camera and send the taken pic back.
Reviewers: #kde_connect, broulik, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, ngraham, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D18142
Summary:
PreferenceActivity has been deprecated since Android 3.0 API 11 in favour of PreferenceFragment
| {F6515113} | {F6515114}|
|Before|
| {F6515111} | {F6515112}|
|After|
Test Plan:
Apply patch and observe that the DeviceSettings and PluginSettings screen behave as expected
and now also follow material design guidelines
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D17859
Summary:
This patch adds cursor acceleration to KDEConnect's remote input plugin. The cursor movement is now scaled down if the movement is slow, and scaled up if the movement is fast.
The acceleration is implemented on the android side. An additional setting was added to the android app's Remote Control plugin preferences, allowing the user to choose the strength of the acceleration, or to disable the acceleration completely.
Test Plan:
After installing this revision on your android device, go to the remote input page and start using the mousepad. Cursor acceleration should be enabled by default.
Check if the cursor acceleration is intuitive and easy to use. Also, try tweaking the acceleration in the Remote input settings in the Plugin settings menu.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D14720
Summary: A simple widget to execute commands from android desktop
Test Plan:
Add the widget and execute commands from it.
By default, the selected device is the first device in the device list.
The selected device can be changed via the widget title.
If there is no commands, the widget show an empty list
If there is no connected device, show the message located in @string/unreachable_description
Reviewers: albertvaka, nicolasfella, #kde_connect
Reviewed By: albertvaka
Subscribers: kdeconnect, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D12507
Summary: Sorry for the huge diff, but all I did was applying Android Studio's 'Reformat Code' to all files. If everyone does that before submitting a patch we can keep it clean easily.
Test Plan: Compiles
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, sredman, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10905
Summary:
BUG: 337485
Adds a notification to show and control mpris players. It shows the title, artist etc. (so depends on D9083, but can easily be adapted to work without it, but that leads to less features).
The notification appears as soon as one of your connected devices plays music. If multiple devices/players are playing, it shows the information and controls for only one of these. If it stops playing, it tries to switch to another playing device/player. If those do not exist, it shows the same player, but allows starting it again.
Dismissing the notification is only possible if the showed player is paused (as effect, only when all players are paused). It automatically closes if the device or player disappears or disconnects and no other players are playing. I think this behaviour is intuitive, other native android music players have similar behaviour.
About the implementation: there are two parts to this: the notification and the media session control API. The first shows the notification and its controls. The second allows lock screen controls on older Android versions and control using e.g. headphone buttons. Since nearly all code is shared between the two parts, and the rest is mostly straightforward, I put them in the same diff.
Test Plan:
Tested on Android Nougat 7.1 (shows the notification with buttons, as expected; no lock screen controls, as expected) and Android Gingerbread 2.3 (shows a notification without buttons, lock screen controls work, so as expected).
I am not able to test with multiple desktops, so testing that would be appreciated.
Disabling buttons when not available should work, but all players I tested always allowed next/previous/play/pause.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: apol, albertvaka, nicolasfella
Tags: #kde_connect
Maniphest Tasks: T6512
Differential Revision: https://phabricator.kde.org/D9266
Summary:
Depends on D10519
Allow to specify a newline separated list of blocked numbers. This can be useful for 2FA/TAN that could be leaked to the desktop.
The protection is incomplete because the notification might be leaked trough the notificationsplugin anyway (T6651).
Test Plan:
Block my number, send SMS to self -> only notification from Notificationsplugin is shown.
Unblock it again -> both notifications are shown
Reviewers: #kde_connect, albertvaka, mtijink
Reviewed By: #kde_connect, albertvaka, mtijink
Subscribers: mtijink, albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10520
Summary:
BUG: 379023
Let users choose a ring tone in the settings.
Test Plan: Open settings, choose a ringtone, search for device.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: mtijink, andyholmes, albertvaka, apol, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10332
Summary: It doesnt seems to be useful any more
Test Plan: Android Studios Safe delete found no usage
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9623
Summary:
Since Android Nougat, the previous way to open a file shared to android did not work anymore (using `file://` urls), as marked with a TODO.
This diff implements the new way of opening files: a content provider url (`content://`) allows opening files through the KDE Connect app. As an added benefit, apps without external files permission can now open files received by KDE Connect.
Test Plan: Works for me.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, nicolasfella
Differential Revision: https://phabricator.kde.org/D9331
Summary: Some values in the mousepad plugin had no default values because some strings were translated but shouldn't.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D6097
Only works for old-school (not-Storage Access Framework) paths, so we have
to keep track of the fact that we are using one or the other.
Also this requires the permission DOWNLOAD_WITHOUT_NOTIFICATION, but
hopefully the play store won't make users confirm this one.
This behaviour is enabled by default.