I am trying to use local notification in phonegap. Here the local notification is working properly but i am not able to see the multiple notifications. Actually all are coming but it is getting overwrited. So I am not able to see everything, I will be able to see the last notification only. Also, when ever I open the app, all the notifications are showing up again. It is showing correctly on time as well. I just want to show the notif on time alone.
var dd = new Date();
dd.setHours(20);
dd.setMinutes(0);
dd.setSeconds(0);
for(var i=0; i < results.rows.length; i++)
{
var a=results.rows.item(i).medicine_name;
var o=new String("Time to take a "+a);
var mor=results.rows.item(i).tm_1;
var aft=results.rows.item(i).tm_2;
var nig=results.rows.item(i).tm_3;
if(mor==0&&aft==1&&nig==1)
{
window.plugin.notification.local.add({ message: o,date: da });
window.plugin.notification.local.add({ message: o,date: dd});
}
}
This is a part of the code.