KaustubhPatange / XClipper

XClipper is a clipboard manager for Windows & Android which helps to track clipboard activities and makes it easier to interact with them.
https://kaustubhpatange.github.io/XClipper
Apache License 2.0
215 stars 25 forks source link

Accessibility service sometimes get stuck & does not monitor clipboard #42

Open DUOLabs333 opened 2 years ago

DUOLabs333 commented 2 years ago

Is your feature request related to a problem? When I close XClipper (swiping up in the recents screen), it can no longer check for clipboard changes.

Describe the solution you'd like: A service that runs XClipper in the background.

KaustubhPatange commented 2 years ago

XClipper uses high-level accessibility service,

Did you enable it from Settings > Accessibility & select XClipper & turn it one! If yes, & doing so it still can't detect let me know your device name & model. Also sometimes it shows that "This service is malfunctioning" or some similar message, let me know that as well.

DUOLabs333 commented 2 years ago

It is -- I should mention that it does work, but only captures the most recent copy, not all the copies that happened since the app was closed. I'm on Android 11, Pixel 5.

KaustubhPatange commented 2 years ago

What do you mean by the most recent copy? Do you mean when the app is closed & removed from the recent menu the service doesn't work anymore which means you are not able to copy anything?

If yes, then there is a problem!

DUOLabs333 commented 2 years ago

No, I can copy, but for example, if I close the app, if I copy "Hello" then "Hello Hi", if I reopen the app, XClipper only shows "Hello Hi" as the newest element, not "Hello".

KaustubhPatange commented 2 years ago

So you are saying "Hello" is not stored in XClipper & you don't see that item when you reopen the app. Am I getting this correct?

DUOLabs333 commented 2 years ago

Yes.

KaustubhPatange commented 2 years ago

But do you get a notification from XClipper saying Clipboard content as "Hello"?

DUOLabs333 commented 2 years ago

I only get a notification when I reopen the app, and only for "Hello Hi".

KaustubhPatange commented 2 years ago

Open XClipper > Settings >General. Can you post the screenshot of this screen!

DUOLabs333 commented 2 years ago

Screenshot_20220311-101954

KaustubhPatange commented 2 years ago

Looks okay to me! So here is another question, is this happening from start or does it happen suddenly? Meaning, was it working earlier or did it happens just now?

DUOLabs333 commented 2 years ago

This has happened from the beginning.

KaustubhPatange commented 2 years ago

Okay so try the following solutions,

  1. Go to Phone Settings > Accessibility > XClipper & make sure the setting is turned on.
  2. In the app, go to Settings > General > uncheck & recheck the "Clipboard Service" setting, do the same for the "Improve detection" setting.
  3. If this still does not works, try rebooting the device once.
  4. If that didn't work, uninstall the app & reinstall the app but this time don't enable "Improve Detection" setting through ADB.
  5. See if this works, if not let me know!
DUOLabs333 commented 2 years ago

Rebooting seems to work.

KaustubhPatange commented 2 years ago

Seems like the accessibility service got stuck! I'll keep this issue open till I figure out why this happened. If you could tell me how to reproduce this issue then it would be much more helpful :)

DUOLabs333 commented 2 years ago

I don't even know how it happened myself.

kstianzui commented 2 years ago

XClipper uses high-level accessibility service,

Did you enable it from Settings > Accessibility & select XClipper & turn it one! If yes, & doing so it still can't detect let me know your device name & model. Also sometimes it shows that "This service is malfunctioning" or some similar message, let me know that as well.

I encountered the same problem. It seems that after Android Q, the background access to the clipboard is restricted. I have not found a solution yet.

KaustubhPatange commented 2 years ago

@kstianzui Did you use this app? The app has a workaround for that limitation & it works perfectly fine on my Pixel 2 (Android 11) & later devices as well.

The issue here addresses a bit different problem, where the accessibility service is killed by the system & I don't know why!

kstianzui commented 2 years ago

Did you use this app? The app has a workaround for that limitation & it works perfectly fine on my Pixel 2 (Android 11) & later devices as well.

Yes, I tested it on my phone, my phone is a Samsung S10+(Android 12), it has enough permissions, and it runs in the background

KaustubhPatange commented 2 years ago

@kstianzui So you are saying on your device the app (Android 12) the app is not working?

kstianzui commented 2 years ago

@kstianzui So you are saying on your device the app (Android 12) the app is not working?

Yes,I tested again just now,no battery limit

KaustubhPatange commented 2 years ago

I don't have an Android 12 device, might've to purchase one to test the app!

kstianzui commented 2 years ago

I don't have an Android 12 device, might've to purchase one to test the app!

Maybe it is an isolated phenomenon, I have tested similar software and none of them are working properly

febryanvaldo commented 2 years ago

I previously have the same problem, but now i found out the solution, make sure to not restricted the app background and also allow background data + unrestricted data. You can see screenshot below. Hopefully it helps.

Screenshot_20220702-201227 Screenshot_20220702-201301

KaustubhPatange commented 2 years ago

Got it, I can force this check when the app is installed that'll tell users to disable restricted battery usage from settings. Thanks for your help.

KaustubhPatange commented 2 years ago

@febryanvaldo Hey, can you tell me your device name for which you have to disable battery optimization in order to make XClipper work?

febryanvaldo commented 2 years ago

@KaustubhPatange Google Pixel 4XL.