Handle and filter Notifications on Android

Asked

Viewed 270 times

1

I’m creating an application for Android in which I use a NotificationListenerService to try to intercept the notifications. The intention is to intercept all notifications and let you pass only those that the user has pre-registration in the application.

Until then I use the method onNotificationPosted(StatusBarNotification sbn) to read the notification and this works up to a point. I can read the notification and remove it from the status bar (status bar) , but the event of push of all applications continues notifying (touches and vibrates).

I wonder if it is possible to manage this push notification of other apps other than my own.

Example: user configures in my app who only wants to receive notification of GMAIL , if you receive a notification of Whatsapp it should pass in my Listener and not allow such notification to status bar and is not notified (push)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.