-
Notifications
You must be signed in to change notification settings - Fork 59
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
GET_CLIPBOARD fails on Android 11 #51
Comments
I also ran into this problem on Android 11. |
@rpes https://developer.android.com/about/versions/10/privacy/changes#clipboard-data Therefore, on devices with OS version 10+, you must first focus on STFService, and then copy data from the device. The solution would be to make a separate service and register it as an input method editor (IME). |
Could you make a PR for that? |
Actualy, I'm not an android developer, so I can hardly help here, I'm developing a solution based on STF and I ran into this problem, in fact I'm just a Node js developer. |
@DonVietnam Thank you for your useful information. As a solution, I propose to bring the active window to the front and hide it while the service is running. |
@DonVietnam Sorry I made you wait. |
My app sets the Android clipboard using SET_CLIPBOARD and then immediately verifies the result through GET_CLIPBOARD.
It works well on my Android 9 device (an old Sony Xperia). It always fails on Google Pixel 4a with the latest Android 11. The SET_CLIPBOARD operation succeeds. I can verify it on the phone. When I send a subsequent GET_CLIPBOARD request the STF service returns an empty text.
In fact I have never succeeded to get any clipboard content from STF on this device. Even if I copy a text on the device screen manually the GET_CLIPBOARD fails to return it.
The text was updated successfully, but these errors were encountered: