Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pop up dictionary no longer responds to clipboard in android 10 #889

Closed
Benhgift opened this issue Sep 4, 2019 · 21 comments
Closed

Pop up dictionary no longer responds to clipboard in android 10 #889

Benhgift opened this issue Sep 4, 2019 · 21 comments

Comments

@Benhgift
Copy link

Benhgift commented Sep 4, 2019

Summary

The pop up dictionary no longer refreshes when Japanese is copied to the clipboard. It's stuck on the welcome screen. I tried reinstalling both apps (pop up and main dictionary) and tried the "Always Available" option in the aedict pop up options.

I've just looked into this and it looks like this app may simply not work on android 10 for the time being due to security. :( https://developer.android.com/about/versions/10/privacy/changes#clipboard-data

Edit: It might be fixable by setting the screen overlay permission https://www.reddit.com/r/tasker/comments/czci0w/things_broken_in_android_10/eyxx74c/

Phone

Pixel 2 running Andoid 10 (updated yesterday).

@mvysny mvysny added the bug label Sep 5, 2019
@mvysny
Copy link
Owner

mvysny commented Sep 5, 2019

Thanks for the info! Yeah the clipboard watching was a gaping security issue, finally they closed it. The Reader should however be integrated into the Copy menu (just press the ... more overflow menu while copying, aedict Reader should be there).

@Pikakitten
Copy link

Would it be possible to re-allow clipboard monitoring for this app ? I use the Aedict reader function with a few apps that don't have an overflow menu and it was very handy to just copy and have the reader pop up :(

@mvysny
Copy link
Owner

mvysny commented Oct 25, 2019

@Pikakitten it's not possible - Android 10 removed the possibility to monitor clipboard. Reader is still listening for clipboard changes, but Android 10 will not simply fire any events.

The only option is to turn Reader into a keyboard app... https://www.androidpolice.com/2019/09/04/dont-upgrade-to-android-10-if-you-rely-on-clipboard-syncing/ ... not sure if that's a good idea...

Meanwhile you can have Reader always appear on screen iconified. Then:

  1. Copy the text from your app
  2. Touch iconified Reader 2 times, then select the "Magnifying glass" icon to enter the text search mode, then paste the text into the search box.

It's a bit unwieldy though, that Reader won't remember the previous mode. It would be great if:

  1. Reader would remember to restore into text search mode when restored from the iconified mode
  2. Reader would iconify when you touch outside.

Please let me know what you think. Perhaps this way we can work around Android 10's limitation.

@mvysny
Copy link
Owner

mvysny commented Oct 27, 2019

Google Translate is affected by this as well:
https://support.google.com/translate/thread/13539043?hl=en

@Pikakitten
Copy link

"1. Reader would remember to restore into text search mode when restored from the iconified mode"
This idea sounds like a brilliant workaround to the clipboard issue! It has been a bit of a hassle to do various clicks for a single search but that would take care of that much

@Benhgift
Copy link
Author

@mvysny That's a good idea (both points), and would improve usability for us android 10 users a lot.

I sorely miss this from android 9 and I regret upgrading.

@mvysny
Copy link
Owner

mvysny commented Feb 5, 2020

Hi, I'm really sorry for the delay. In order to develop the support for Android 10 properly, it's best to actually own an Android 10 device. My Xiaomi Mi A2 Lite is part of Android One and has been promised at least two major updates (which include Android 10). Just recently Xiaomi promised to also release Android 10 for Mi A2 Lite. There are hints that the upgrade is under testing, so it might be out this month (fingers crossed). However, I'll try Android Emulator for Android 10 again - I remember that I had trouble reproducing the issue in the Emulator, but perhaps those have been fixed. Let me try again.

@mvysny
Copy link
Owner

mvysny commented Feb 5, 2020

I was able to reproduce this issue on the Android 10 Emulator (Reader not reacting to Copy-to-Clipboard). So it's definitely a thing, and the Reader needs to warn the users on Android 10 that Copy-to-Clipboard no longer works.

However, there is a workaround, please see the attached video and please let me know whether that works for you: https://youtu.be/8Uz7k02nJIw

@mvysny
Copy link
Owner

mvysny commented Feb 29, 2020

Sorry for the delay, finally implemented 👍 There are two things implemented:

  1. There is a new button just for Android 10 in Reader's notification: 'Analyze Clipboard'. While the Reader still can't read the clipboard itself, it will open itself in the text search mode, with the EditText field selected, so you should be able to long-press the EditText and paste the clipboard there easily.
  2. On top of that, Reader should now be able to remember its state.

Hopefully this combination will make things bearable with Android 10. I'm going to release a new version today, please upgrade to Reader 1.4.8 and let me know whether there's any improvement :)

@dezorianguy
Copy link

dezorianguy commented Jun 11, 2020

"There` is a new button just for Android 10 in Reader's notification: 'Analyze Clipboard'."

Sorry, but I can't seem to find the new button. How do i get to open the Reader's notification?
I am currently on Android 10.
So, just to be sure: On Android 10 there is no way to just mark & copy text to automatically be provided by with a aedict popup box, correct?

@mvysny
Copy link
Owner

mvysny commented Jun 22, 2020

@dezorianguy sorry, I don't know what happened, the feature was supposed to be present in 1.4.8.

I have released 1.4.9, please try to upgrade and let me know whether the issue is fixed. After the upgrade, you will be able to verify the Reader version in the Settings / About dialog.

@gitTerebi
Copy link

Looks like its possible to grant access back to apps using adb commands.
https://forum.joaoapps.com/index.php?threads/clipboard-monitor-listener-no-longer-works-on-android-10.49808/

Would something work as an unofficial way to get it to work?

@mvysny
Copy link
Owner

mvysny commented Oct 12, 2020

Hmm, I've checked the solution really quickly: it appears that the solution is to enable access to the system logs, in hope that the clipboard appears in the logs. Yet there are reports that the solution doesn't work reliably unfortunately: https://www.reddit.com/r/JoinApp/comments/deimyz/dev_join_22beta_fix_for_clipboard_monitoring_on/

@mvysny
Copy link
Owner

mvysny commented Oct 26, 2020

Please find a summary here: https://mvysny.github.io/aedict-blog/reader-android-10/

@gitTerebi
Copy link

Is it possible to push aedict as the first option when poping up right click menu? Or is this based on the app?

@mvysny
Copy link
Owner

mvysny commented Oct 26, 2020

Is it possible to push aedict as the first option when poping up right click menu? Or is this based on the app?

I'm not sure I understand. Right click on Android?

@gitTerebi
Copy link

When you do a long press it opens up that pop up menu with copy/paste etc

@mvysny
Copy link
Owner

mvysny commented Oct 26, 2020

@gitTerebi Ah right, you mean the text selection actions menu as shown here: https://medium.com/androiddevelopers/custom-text-selection-actions-with-action-process-text-191f792d2999 . Currently only the Aedict Reader integrates into that menu; if you'd like to have Aedict as well to integrate into that menu, please open a new feature request.

I'm closing this bug report as fixed:

  1. It's not possible to fix since starting with Android 10 it's not possible to monitor a clipboard;
  2. However, workarounds have been implemented and are summarized at https://mvysny.github.io/aedict-blog/reader-android-10/

Closing as fixed; if there is a better idea to resolve this, please open a new bug report.

@mvysny mvysny closed this as completed Oct 26, 2020
@gitTerebi
Copy link

I mean that aedict reader puts itself in line with copy/paste so that we don't have to press the '...' button.

@mvysny
Copy link
Owner

mvysny commented Oct 26, 2020

That menu is unfortunately controlled by Android itself and can not be modified. There is no way for Reader (or any other app, including e.g. Google Translate) to move outside of the ... button.

@gitTerebi
Copy link

understood! thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants