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

update data

parent fbe27081
......@@ -98,8 +98,7 @@ class MainPage extends Component {
.setBody("Force touch to reply")
.setSound("bell.mp3")
.setData({
key1: 'value1',
key2: 'value2'
now: new Date().toISOString()
});
notification.ios.badge = 10
notification.android.setAutoCancel(true);
......@@ -125,8 +124,7 @@ class MainPage extends Component {
.setBody("Force touch to reply")
.setSound("bell.mp3")
.setData({
key1: 'value1',
key2: 'value2'
now: new Date().toISOString()
});
notification.android.setChannelId("test-channel")
notification.android.setPriority(firebase.notifications.Android.Priority.High)
......
......@@ -15,8 +15,8 @@ function displayNotificationFromCustomData(message: RemoteMessage){
}
}
export function registerKilledListener(message: RemoteMessage){
AsyncStorage.setItem('lastNotification', JSON.stringify(message.data));
export async function registerKilledListener(message: RemoteMessage){
await AsyncStorage.setItem('lastNotification', JSON.stringify(message.data));
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