Commit 9e32abba authored by Libin Lu's avatar Libin Lu

update data

parent fbe27081
...@@ -98,8 +98,7 @@ class MainPage extends Component { ...@@ -98,8 +98,7 @@ class MainPage extends Component {
.setBody("Force touch to reply") .setBody("Force touch to reply")
.setSound("bell.mp3") .setSound("bell.mp3")
.setData({ .setData({
key1: 'value1', now: new Date().toISOString()
key2: 'value2'
}); });
notification.ios.badge = 10 notification.ios.badge = 10
notification.android.setAutoCancel(true); notification.android.setAutoCancel(true);
...@@ -125,8 +124,7 @@ class MainPage extends Component { ...@@ -125,8 +124,7 @@ class MainPage extends Component {
.setBody("Force touch to reply") .setBody("Force touch to reply")
.setSound("bell.mp3") .setSound("bell.mp3")
.setData({ .setData({
key1: 'value1', now: new Date().toISOString()
key2: 'value2'
}); });
notification.android.setChannelId("test-channel") notification.android.setChannelId("test-channel")
notification.android.setPriority(firebase.notifications.Android.Priority.High) notification.android.setPriority(firebase.notifications.Android.Priority.High)
......
...@@ -15,8 +15,8 @@ function displayNotificationFromCustomData(message: RemoteMessage){ ...@@ -15,8 +15,8 @@ function displayNotificationFromCustomData(message: RemoteMessage){
} }
} }
export function registerKilledListener(message: RemoteMessage){ export async function registerKilledListener(message: RemoteMessage){
AsyncStorage.setItem('lastNotification', JSON.stringify(message.data)); await AsyncStorage.setItem('lastNotification', JSON.stringify(message.data));
displayNotificationFromCustomData(); displayNotificationFromCustomData();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment