@victorcarvalhosp wrote:
I'm using the push plugin, and work's perfectly when the app is open, but when the app is closed the method is not called...
My code look like this:
this.platform.ready().then(() => { console.log('Platform ready'); this.initPush(); } initPush() { let push = Push.init({ android: { senderID: "XXXXXX" }, ios: { alert: "true", badge: true, sound: 'false' }, windows: {} }); push.on('registration', (data) => { console.log("REGISTRATION"); localStorage.setItem('token', data.registrationId); }); push.on('notification', (data) => { console.log('ONLY WORK'S WHEN APP IS OPEN') }); push.on('error', (e) => { console.log(e.message); });}
How can I do to show the message from my push at any moment?
Thank's!
Posts: 4
Participants: 3