Push geht jetzt auch wenn das Tab von SmartShopper nicht im Vordergrund ist
This commit is contained in:
Georg Reisinger 2019-01-17 20:02:26 +01:00
parent f9f7e656a7
commit faf16fb1c3

View File

@ -17,9 +17,11 @@ const messaging = firebase.messaging();
messaging.setBackgroundMessageHandler(payload => {
// const title = payload.data.title
// const options = {
// body: payload.data.text
// }
// return self.registration.showNotification(title, options)
const title = payload.data.title
const options = {
body: payload.data.text
}
return self.registration.showNotification(title, options)
new Notification(title, { body: payload.data.text});
})