AlexN7
Lurker
Hi, I'm new on this forum, is there anyone knows how to get individual notifications from whatsapp using a NotificationListenerService? at this time I can get correctly a message when it is the only, if the service receive another message the notification that I get is only "Whatsapp" because are grouped. This is the onNotificationPosted in my NotificationListenerService:
Code:
@Override
public void onNotificationPosted(StatusBarNotification sbn) {
Notification mNotification=sbn.getNotification();
if (mNotification!=null && checkPackage(sbn.getPackageName())){
Bundle extras = mNotification.extras;
Log.d("Title", extras.getString(Notification.EXTRA_TITLE));
Intent intent = new Intent(this,GUI.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra("extras", extras);
startActivity(intent);
}
}