I’m developing an app in which I want to listen to notifications from an app on the phone. I’m pretty new to android development, so any guidance would be appreciated.
My thought is that I need to create my service that extends AccessibilityService and implement onAccessibilityEvent.
I’m not sure then how to connect my service to the app whose notifications I want to listen to…
You cannot “connect my service to the app whose notifications I want to listen to” — you will get all notifications from all apps, because the point behind
AccessibilityServiceis to actually provide accessibility features. A blind user is not blind for one app, but for all apps.That being said, you are welcome to examine the
AccessibilityEventto see where it came from.