I want add push cloud message in my application. I add in manifect:
<service
android:name=".firebase.MyFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
and add MyFirebaseMessagingService class and interface for it. If my application is run, I get message as RemoteMessage in my service. If application is down, push message receiver android and show notification in top part of the screen. I click this push, my application runninig and mainAcrivity have intent extras. Code in mainActivity onCreate:
if (getIntent().getExtras() != null) {
for (String key : getIntent().getExtras().keySet()) {
Object value = getIntent().getExtras().get(key);
Log.d(TAG, "Key: " + key + " Value: " + value);
}
}
Logcat output:
Key: google.delivered_priority Value: high
Key: google.sent_time Value: 1574665753356
Key: google.ttl Value: 2419200
Key: google.original_priority Value: high
Key: from Value: 69200725691
Key: google.message_id Value: 0:1574665753390474%7139185571391855
Key: collapse_key Value: ru.ittest.freezio_senser
Why I receiver no RemoteMessage? How can I get RemoteMessage use this keys?