2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 05:07:40 +00:00

35 Commits

Author SHA1 Message Date
Piyush Aggarwal
29ca097054 mousepadplugin: allow selecting which click to send for left click 2022-01-10 19:46:18 +00:00
Maxim Leshchenko
04f3662a56 Replace checkboxes with switches in plugins settings 2021-05-11 17:22:08 +00:00
Sohny Bohny
28efb48257 Implement basic mouse receiver
## 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

![Screen_Capture_select-area_20200803155517](/uploads/635de03b6c7cc6765c4535cb8d80e77e/Screen_Capture_select-area_20200803155517.gif)
2021-04-04 06:34:52 +00:00
Daniel Weigl
801b6451ed Accept data via Intent and pass them on to the host as keystrokes
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
2021-03-09 16:47:15 +00:00
Aniket Kumar
2758fba3d0 Removed APN settings from user preferences completely and replaced Klinker's get APN settings method with TelephonyHelper's getPreferredApn method. 2020-08-05 15:14:30 +05:30
Isira Seneviratne
4d1cc5b174 Replace phone link PNGs with vector drawables. 2020-07-09 14:35:10 +00:00
Isira Seneviratne
355d6a4190 Replace keyboard hide PNGs with a vector drawable. 2020-07-09 14:35:10 +00:00
Isira Seneviratne
8622c6c5f9 Replace keyboard PNGs with a vector drawable. 2020-07-09 14:35:10 +00:00
Aniket Kumar
b119de8e76 Added MMS support to the SMSPlugin using Klinker library. 2020-07-05 13:32:44 +05:30
Daniel Tang
4291473106
Use material design settings icon 2020-04-27 22:37:16 -04:00
Mitja Cotic
b8d327c2d9 [pretty please] allow fetching of cover art in mpris plugin from connected computer
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
2019-05-18 10:50:14 +02:00
Nicolas Fella
2a36194273 Add tools:keep to plugin prefs to avoid false-positive lint 2019-04-19 21:37:13 +02:00
Erik Duisters
a6fdddf843 Use Storage Access Framework on SDK >= 21 (Lollipop and above)
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
2019-03-08 15:02:10 +01:00
Nicolas Fella
43ae02d68f [Android] Add photo plugin
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
2019-03-04 23:47:38 +01:00
Erik Duisters
9fb780f919 Migrate from PreferenceActivity to PreferenceFragment because it has been deprecated since Android 3.0 API11
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
2019-01-06 12:36:42 +01:00
Nicolas Fella
2410782662 Fix XML warnings 2018-10-27 00:39:41 +02:00
Chansol Yang
6db7ffd1db Add acceleration to remote input cursor
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
2018-08-13 23:50:29 +02:00
Nicolas Fella
e0fde16525 Added runcommandplugin widget
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
2018-07-30 18:15:25 +02:00
Nicolas Fella
8d9681a05d Avoid empty XML tags
Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11006
2018-03-04 13:16:22 +01:00
Nicolas Fella
fa5a37c472 Apply coding style to whole project
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
2018-03-03 16:09:52 +01:00
Matthijs Tijink
2f127b3047 Add MPRIS media control notification
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
2018-02-24 17:01:08 +01:00
Nicolas Fella
e9a35d3bb2 Allow to blacklist numbers in the telephony plugin
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
2018-02-24 15:53:56 +01:00
Nicolas Fella
4d5d744920 Allow choosing a ringtone for FindMyPhone
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
2018-02-22 00:50:32 +01:00
Nicolas Fella
fdaa632a39 Delete general_preferences.xml
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
2018-01-06 16:04:03 +01:00
Matthijs Tijink
c6746e38a0 Allow opening files shared to android using the notification
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
2017-12-20 17:53:35 +01:00
Nicolas Fella
5886422d72 Fixed a bug in MousepadPlugin
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
2017-06-08 13:25:06 +02:00
Holger Kaelberer
ca9704eab2 Add remotekeyboard plugin
BUG: 370919
REVIEW: 129728
2017-01-23 09:07:18 +01:00
Albert Vaca
1334dae342 Added a Share setting to add received files to the "Downloads" app
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.
2016-12-11 21:03:39 +01:00
Albert Vaca
b3449c87f7 Rewritten ShareSettingsActivity and de-duplicated SAF code in SharePlugin.
There was unused code and incorrect comments that were introduced in
commit e2e4086.
2016-12-11 18:57:21 +01:00
Richard Wagler
e2e40863f8 Implement saving to SD card using SAF 2016-12-11 14:01:46 +01:00
Imran Tatriev
e3c5ac9228 Adjust the touchpad sensitivity 2016-01-21 16:39:31 +06:00
Rahil Momin
b2804a4378 Add natural scroll option to mousepad plugin
REVIEW: 126141
2015-12-01 03:40:05 -08:00
Albert Vaca
2f77e24ad1 Possible crash related to device name handling
BUG: 348844
2015-06-14 02:59:14 -07:00
Albert Vaca
3b0a3e265d Plugin key is now the plugin class instead of being defined by each plugin 2015-06-06 00:39:04 -07:00
Albert Vaca
f01811446a Migrated project to latest Android SDK and moved sources out of 'main' dir
Sorry for the conflicts caused by moving the sources!
2014-11-22 17:04:37 -08:00