I have a NotificationListenerService and a:
@Override
public void onNotificationPosted(StatusBarNotification sbn) {
Log.i(TAG,"********** onNotificationPosted");
Log.i(TAG,"ID :" + sbn.getId() + "t" + sbn.getNotification().tickerText + "t" + sbn.getPackageName());
}
How can I cancel that notification from the onNotificationPosted()
? I tried a simple manager.cancel(sbn.getId());
but it didn't worked