How to print the error of termination of Accessibility Service in logcat?

31 Views Asked by At

I have an accessibility service setup in my app. Whenever I close/kill the app from the apps drawer the accessibility service should ideally run in the background but this doesn't happen. Instead the accessibility service terminates immediately after the app is closed and in the accessibility service manager of the android, it shows "This service is not working properly". Am I missing something in the logcat provided by Android Studio IDE itself ?

What I tried is printing the some stuff in the "onUnbind()" method, but its not getting printed in the logcat. I just want to know exactly what is causing the accessibility service to terminate/crash as soon as I kill the app from apps drawer. Also each time I close the app the service doesn't goes "off" it stops working properly.

0

There are 0 best solutions below