Прикладываю часть кода, как видно эти команды(из гугла) не помогают, или я не понял как их использовать.
УТОЧНЮ:всё работает пока приложение открыто.
constructor(private localNotifications: LocalNotifications, public http: HttpClient, public platform:Platform) {
(<any>window).skipLocalNotificationReady = true;
this.localNotifications.fireQueuedEvents();
localNotifications.requestPermission();
this.platform.ready().then(() => {
this.localNotifications.on("click").subscribe(notification=>this.pushdown(notification));
});
}
pushdown(notification)
{
alert(notification.title);
alert(notification.data.mydata);
}
Сам код пуша:
// Schedule delayed notification
this.localNotifications.schedule({
trigger: {in:1,count:1},
title: 'Привет я уведомление',
text: 'Нажми и что-то увидишь',
led: 'FFFFF',
data: { mydata : 'Это текст в "data"' },
sound: null