Issue
I am trying to configure local notification in my ionic app using cordova-plugin-local-notification. But it is not working.
Please suggest where i am doing the mistake.
Now i am using the below query to set the notification.
localStorage.setItem("notifytime", "3600");
var notiftime = localStorage.getItem("notifytime");
this.localNotifications.schedule({
text: 'Delayed ILocalNotification',
trigger: {at: new Date(new Date().getTime() + notiftime)},
led: 'FF0000',
sound: null
});
Solution
Convert the notiftime variable to int before:
var notiftime = localStorage.getItem("notifytime");
var time = parseInt(notiftime);
new Date(new Date().getTime() + time);
Answered By - Alyson
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.