1

Might be some small thing I am missing here. I am unable to get the data payload for the notification message. What is wrong with this code? :

   Bundle extras = getIntent().getExtras();
   Intent intent  = getIntent();
Set<String> strings =  extras.keySet();

for(String each: strings){

    Log.d("notiffff", each);

}

This code executes after I click the notification message from the system tray (from a notification delivered in the background). The optional data payload I put in the console does not appear here. I want it, where am I going wrong?

AL.
  • 36,815
  • 10
  • 142
  • 281
10101010
  • 607
  • 8
  • 24
  • 1
    Possible duplicate of [Firebase (FCM): open activity and pass data on notification click. android](https://stackoverflow.com/questions/40181654/firebase-fcm-open-activity-and-pass-data-on-notification-click-android) – AL. Mar 20 '18 at 17:25
  • Try adding in the keys you included in your `data` payload. – AL. Mar 20 '18 at 17:26

0 Answers0