Issue is that sbn
is null, in your onClick
You need to get the list of notification with NotificationListenerService
, before accessing it.
(sbn.getPackageName().contains("com.facebook.katana") telling me that API 18 is required
You need to change minSdkVersion 18
in gradle build config