NotificationListenerService Implementation

At least one problem with your code is that your implementation of onBind()

There is no necessity to override this method. But if you must, then at least return the IBinder returned by the superclass.

@Override
public IBinder onBind(Intent intent) {
    return super.onBind(intent);
}

Inside the NotificationListenerService you need a looper to communicate with GUI thread so you can create a broadcast to handle the GUI interaction.

Hope this example will help you.


You need to grant access to your app to read notifications: "Settings > Security > Notification access" and check your app.