Bug 479919 - Let us disable automatic clipboard sharing from Android too (so I can share only when clicking the button)
Summary: Let us disable automatic clipboard sharing from Android too (so I can share o...
Status: REPORTED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (show other bugs)
Version: unspecified
Platform: Android Android 10.x
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-16 21:03 UTC by Geekley
Modified: 2024-01-29 02:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geekley 2024-01-16 21:03:25 UTC
SUMMARY
On the Linux side of KDE Connect's Clipboard Sharing Plugin, there's an option to disable "automatic sharing the clipboard from this device". So this works from PC side.

Please add the same option on the Android side too. Currently, there is a "send to clipboard" button, but no option to disable auto-sharing. Whenever I copy or cut something on Android, it's being always sent even if I don't click the button. But if I disable the plugin on Android, then I can't share it at all (even though the button still exists in the persistent notification).

On that note, you could also improve by showing multiple clipboard entries on the in-app button so I can pick one entry to send, not necessarily the last one.

STEPS TO REPRODUCE
1. On Android, open KDE Connect and go to the plugin settings for the paired device.
2. Enable synchronize clipboard plugin.
3. Copy some text.

OBSERVED RESULT
There's no additional options for the plugin like on PC side. Copied text appears on the PC clipboard too automatically.

EXPECTED RESULT
Plugin configuration on Android should show an option to disable auto-sharing like on PC. When disabled, text is sent only when clicking one of the sent to clipboard buttons.
The button to sent to clipboard inside the app could list all clipboard entries, starting from the latest, so you can pick which one to send. The other buttons (in persistent notification and quick panel) can just keep sending the last entry.

SOFTWARE/OS VERSIONS
Android: 10, on a Samsung Phone
KDE Connect App: 1.29.0 from F-Droid

ADDITIONAL INFORMATION
This setting on PC is great because then I have the option to share only when I click the button. I don't want to synchronize anything automatically - I want to only send clipboard explicitly. I don't want to worry about what's on my clipboard (e.g. passwords, arbitrary text) beyond that device, maybe being persisted for a long time. Overriding the other clipboard gets in my way if it's not explicitly intended.
Comment 1 Saif Masoud 2024-01-29 02:59:59 UTC
I got the feature working at https://invent.kde.org/saifmasoud/kdeconnect-android/-/tree/create-clipboard-auto-share-pref?ref_type=heads

Still need little fixes and for the work to be reviewed by someone. On my device, the auto-share is only triggered when I open the app, but everything else is normal and the patch I wrote is working as expected.