0

So I'm in this situation where I have to detect a click on the notification and read its metadata using AccessibilityService. For this I'm currently using AccessibilityEvent.TYPE_VIEW_CLICKED but it doesn't seem to work. It is not able to capture the click on the notification.

Also I tried using typeNotificationStateChanged and NotificationListenerService but to no avail as both these don't have methods or functions to detect a click on the notification (I'm not sure though).

Will be glad if anybody could help me out.

Note - The notifications belong to other apps and not built by my app.

What I want -

-> Detect a click on notification and extract details like title, message etc.

What I don't want -

-> Detect an incoming notification

Any help would be appreciated.

Thank you.

Rektirino
  • 582
  • 5
  • 24
  • Are building the notification by yourself, or using a service like FCM? – Mahdi-Malv Sep 08 '19 at 09:20
  • @Mahdi-Malv The notifications are not built by me. They belong to other apps. Like if my app is "A", and my app is trying to detect notification click of app "B". – Rektirino Sep 08 '19 at 09:22

0 Answers0