The case: I’m using Katzer’s LocalNotification plugin in my project to show notifications received via socket events with socket.io. When app receives event, handler method builds and schedules notification. But for some reason only last notification is shown
handleEventMsg(data: any) {
this.logEvent(data.type, data);
let notificationOpt: ILocalNotification = {
id: Math.random(),//attempt to solve issue
title: data.type,
text: data.data,
sound: null,
at: new Date(new Date().getTime() + 1000)
};
switch (data.type) {
case 'new_task':
// sound assign
// notificationOpt.sound = 'file://assets/new_job.mp3';
//
//
}
this.localNotifications.schedule(notificationOpt);
}
Appreciate any help or advice.