从 FCM 上的远程消息中获取价值接收方法
2022-09-01 13:35:21
我已迁移为推送通知消息。但是我如何从远程消息接收到的捆绑数据消息接收方法。gcm to fcm
Old GCM give bundle data onMessageReceiced method but in FCM there is RemoteMessage data.
因此,请告诉我如何解析远程消息以获取通知的所有值。
我的付费
{
"collapse_key":"score_update",
"priority":"high",
"content_available":true,
"time_to_live":108,
"delay_while_idle":true,
"data":
{
"message": "Message for new task",
"time": "6/27/2016 5:24:28 PM"
},
"notification": {
"sound": "simpleSound.wav",
"badge": "6",
"title": "Test app",
"icon": "myicon",
"body": "hello 6 app",
"notification_id" : "1140",
"notification_type" : 1,
"notification_message" : "TEST MESSAGE",
"notification_title" : "APP"
},
"registration_ids": ["cRz9SJ-gGuo:APA91bFJPX7_d07AR7zY6m9khQro81GmSX-7iXPUaHqqcOT0xNTVsOZ4M1aPtoVloLNq71-aWrMCpIDmX4NhMeDIc08txi6Vc1mht56MItuVDdA4VWrnN2iDwCE8k69-V8eUVeK5ISer"
]
}