If the user click on the notification (which is sent by firebase cloudmessing), by default it opens my application (My main activity) and I can get the payload by this code in main activity
if (getIntent().getExtras() != null) {
for (String key : getIntent().getExtras().keySet()) {
String value = getIntent().getExtras().getString(key);
Log.d(TAG, "Key: " + key + " Value: " + value);
startOtherActivity();
}
}
But I don't want to get the payload in main activity because my main activity is splash activity and it only lives for 3 seconds then it will jump to another activity. How I can get the payload in other activity? (not main activity)