Parse push fields
After receiving a push notification, you need to parse the data.
Rewrite the FirebaseMessagingService.onMessageReceived method to get the custom extension field in the RemoteMessage object. The sample code is as follows:
| Parameter | Description |
|---|---|
f | The user ID of the push notification sender. |
t | The user ID of the push notification recipient. |
m | The message ID: A unique identifier of the message. |
g | The group ID: This field exists only for group messages. |
e | The user-defined extension field. |
e is a completely user-defined extension. The data source is em_push_ext.custom of the message extension. The data structure is as follows:
The data structure of the extension in the RemoteMessage object is as follows: