[kdeconnect] [Bug 417419] Support 'send text' while android 10 prevent global clipboard.

2020-03-11 Thread Simon Redman
https://bugs.kde.org/show_bug.cgi?id=417419

Simon Redman  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Latest Commit||https://invent.kde.org/kde/
   ||kdeconnect-android/commit/b
   ||81d3a82e5a71757388fffb4a3b3
   ||486aea74d1aa
 Status|REPORTED|RESOLVED

--- Comment #2 from Simon Redman  ---
Git commit b81d3a82e5a71757388fffb4a3b3486aea74d1aa by Simon Redman, on behalf
of Anjani Kumar.
Committed on 12/03/2020 at 03:56.
Pushed by sredman into branch 'master'.

Make Clipboard plugin work in Android X

## Summary

Fixes #5

This patch introduces a workaround to access the restricted clipboard in
Android X.
Clipboard synchronisation in KDE Connect was one of the killer features before
Android X. An action button is added in the persistent foreground notification
**Send Clipboard** which adds the ability to send the clipboard using a small
workaround. Clipboard Synchronisation works as usual in lower Android Versions.

This is a very convenient workaround for sending clipboard quickly as it does
not requires to open the app. Floating Activity is quite handy for quick
actions.

## Details of the workaround

### ClipboardFloatingActivity

* This activity is only executed in Android X.
* This is transparent, accesses the clipboard when in focus.
* Sends a `NetworkPacket` containing *text* and *timestamp*.
* When the packet has been sent, it pops up a toast with a success message.
* Automatically closes after the showing the Toast.

### Reverted changes for Android X.

* Changes done in commits 54be4a1a997e14516353f5104ef1619f98ba99ec and
9f3b75b7483fe79527d635ad10a2bb7cf6496d8c have been reverted.
* These changes are not required anymore as the workaround for clipboard sync
works.

The action button in the notification for **Send Clipboard** is not added in
the lower versions of Android. **It is only added in Android X**.

**Two way sync is working in Android X with this patch. Sync works normally in
lower Android versions.**

## Test Plan

### Before:

Clipboard from PC to Phones were synchronised but Clipboard of phones didn't
get synchronised with the PC.

### After:

The action button is up in Android X while using other apps.

![Screenshot_20200227-150435_Chrome](/uploads/201960e1577321c8a77c9945bd2b5e76/Screenshot_20200227-150435_Chrome.png)

After clicking the button, a cute Toast appears with the message *Clipboard
sent*

![Screenshot_20200228-233701_Chrome](/uploads/8da58b1006b95ce82c7cec2c91f32878/Screenshot_20200228-233701_Chrome.png)

I think this is one of the best workarounds available to make this awesome
plugin work.

M  +3-0AndroidManifest.xml
M  +2-0res/values/strings.xml
M  +8-0res/values/styles.xml
M  +9-0src/org/kde/kdeconnect/BackgroundService.java
A  +50   -0   
src/org/kde/kdeconnect/Plugins/ClibpoardPlugin/ClipboardFloatingActivity.java
M  +1-24  
src/org/kde/kdeconnect/Plugins/ClibpoardPlugin/ClipboardPlugin.java
M  +0-6src/org/kde/kdeconnect/UserInterface/MainActivity.java
D  +0-68  
src/org/kde/kdeconnect/UserInterface/NoticeAlertDialogFragment.java

https://invent.kde.org/kde/kdeconnect-android/commit/b81d3a82e5a71757388fffb4a3b3486aea74d1aa

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdeconnect] [Bug 417419] Support 'send text' while android 10 prevent global clipboard.

2020-03-11 Thread Simon Redman
https://bugs.kde.org/show_bug.cgi?id=417419

Simon Redman  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Latest Commit||https://invent.kde.org/kde/
   ||kdeconnect-android/commit/b
   ||81d3a82e5a71757388fffb4a3b3
   ||486aea74d1aa
 Status|REPORTED|RESOLVED
 Resolution|--- |FIXED
 Status|REPORTED|RESOLVED
  Latest Commit||https://invent.kde.org/kde/
   ||kdeconnect-android/commit/b
   ||81d3a82e5a71757388fffb4a3b3
   ||486aea74d1aa

--- Comment #2 from Simon Redman  ---
Git commit b81d3a82e5a71757388fffb4a3b3486aea74d1aa by Simon Redman, on behalf
of Anjani Kumar.
Committed on 12/03/2020 at 03:56.
Pushed by sredman into branch 'master'.

Make Clipboard plugin work in Android X

## Summary

Fixes #5

This patch introduces a workaround to access the restricted clipboard in
Android X.
Clipboard synchronisation in KDE Connect was one of the killer features before
Android X. An action button is added in the persistent foreground notification
**Send Clipboard** which adds the ability to send the clipboard using a small
workaround. Clipboard Synchronisation works as usual in lower Android Versions.

This is a very convenient workaround for sending clipboard quickly as it does
not requires to open the app. Floating Activity is quite handy for quick
actions.

## Details of the workaround

### ClipboardFloatingActivity

* This activity is only executed in Android X.
* This is transparent, accesses the clipboard when in focus.
* Sends a `NetworkPacket` containing *text* and *timestamp*.
* When the packet has been sent, it pops up a toast with a success message.
* Automatically closes after the showing the Toast.

### Reverted changes for Android X.

* Changes done in commits 54be4a1a997e14516353f5104ef1619f98ba99ec and
9f3b75b7483fe79527d635ad10a2bb7cf6496d8c have been reverted.
* These changes are not required anymore as the workaround for clipboard sync
works.

The action button in the notification for **Send Clipboard** is not added in
the lower versions of Android. **It is only added in Android X**.

**Two way sync is working in Android X with this patch. Sync works normally in
lower Android versions.**

## Test Plan

### Before:

Clipboard from PC to Phones were synchronised but Clipboard of phones didn't
get synchronised with the PC.

### After:

The action button is up in Android X while using other apps.

![Screenshot_20200227-150435_Chrome](/uploads/201960e1577321c8a77c9945bd2b5e76/Screenshot_20200227-150435_Chrome.png)

After clicking the button, a cute Toast appears with the message *Clipboard
sent*

![Screenshot_20200228-233701_Chrome](/uploads/8da58b1006b95ce82c7cec2c91f32878/Screenshot_20200228-233701_Chrome.png)

I think this is one of the best workarounds available to make this awesome
plugin work.

M  +3-0AndroidManifest.xml
M  +2-0res/values/strings.xml
M  +8-0res/values/styles.xml
M  +9-0src/org/kde/kdeconnect/BackgroundService.java
A  +50   -0   
src/org/kde/kdeconnect/Plugins/ClibpoardPlugin/ClipboardFloatingActivity.java
M  +1-24  
src/org/kde/kdeconnect/Plugins/ClibpoardPlugin/ClipboardPlugin.java
M  +0-6src/org/kde/kdeconnect/UserInterface/MainActivity.java
D  +0-68  
src/org/kde/kdeconnect/UserInterface/NoticeAlertDialogFragment.java

https://invent.kde.org/kde/kdeconnect-android/commit/b81d3a82e5a71757388fffb4a3b3486aea74d1aa

--- Comment #3 from Simon Redman  ---
Git commit b81d3a82e5a71757388fffb4a3b3486aea74d1aa by Simon Redman, on behalf
of Anjani Kumar.
Committed on 12/03/2020 at 03:56.
Pushed by sredman into branch 'master'.

Make Clipboard plugin work in Android X

## Summary

Fixes #5

This patch introduces a workaround to access the restricted clipboard in
Android X.
Clipboard synchronisation in KDE Connect was one of the killer features before
Android X. An action button is added in the persistent foreground notification
**Send Clipboard** which adds the ability to send the clipboard using a small
workaround. Clipboard Synchronisation works as usual in lower Android Versions.

This is a very convenient workaround for sending clipboard quickly as it does
not requires to open the app. Floating Activity is quite handy for quick
actions.

## Details of the workaround

### ClipboardFloatingActivity

* This activity is only executed in Android X.
* This is transparent, accesses the clipboard when in focus.
* Sends a `NetworkPacket` containing *text* and *timestamp*.
* When 

[kdeconnect] [Bug 417419] Support 'send text' while android 10 prevent global clipboard.

2020-02-24 Thread Gerd
https://bugs.kde.org/show_bug.cgi?id=417419

Gerd  changed:

   What|Removed |Added

 CC||ger...@gmx.de

--- Comment #1 from Gerd  ---
There is maybe a workaround for the clipboartd reading:

I am using a multi clipboard manager called "Clip Stack", which is also
affected by this Google limitation, but its developer has found a
workaround which might also work for KDE Connect in a similar way.

See
https://play.google.com/store/apps/details?id=com.catchingnow.tinyclipboardmanager,
where the developer also has described who to make it work by simply
applying some ADB commands from a PC:

  adb -d shell appops set com.catchingnow.tinyclipboardmanager
SYSTEM_ALERT_WINDOW allow;
  adb -d shell pm grant com.catchingnow.tinyclipboardmanager
android.permission.READ_LOGS;
  adb -d shell am force-stop com.catchingnow.tinyclipboardmanager;

-- 
You are receiving this mail because:
You are watching all bug changes.