Commit 24c29f39 authored by Libin Lu's avatar Libin Lu

picture example

parent 2ed1c1b5
......@@ -33,7 +33,8 @@ export default class App extends Component {
title: 'Hello',
body: 'Test Notification',
priority: "high",
show_in_foreground: true
show_in_foreground: true,
picture: 'https://firebase.google.com/_static/af7ae4b3fc/images/firebase/lockup.png'
});
}
......
......@@ -49,8 +49,6 @@ export default class PushController extends Component {
break;
}
}
this.showLocalNotification(notif);
});
this.refreshTokenListener = FCM.on(FCMEvent.RefreshToken, token => {
console.log("TOKEN (refreshUnsubscribe)", token);
......@@ -66,16 +64,7 @@ export default class PushController extends Component {
setTimeout(function() {
FCM.isDirectChannelEstablished().then(d => console.log(d));
}, 1000);
}
showLocalNotification(notif) {
FCM.presentLocalNotification({
title: notif.title,
body: notif.body,
priority: "high",
click_action: notif.click_action,
show_in_foreground: true
});
})
}
componentWillUnmount() {
......
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