The notification should trigger on the selected date and time.
The notification works in background too but I can just hear the sound and the notification does not appear on the top.
I have tried with the method "ontrigger" but it hasn't worked. What should I do?
Please, help me.
....
var reminderTime = new Date(DateFromTheDataBase[index]);
opt = {
id : indexID,
title : 'Title',
message : data.intent+'\n',
sound : '/www/mySound/sound.wav',
autoCancel : true,
date : reminderTime
}
if(window.plugin && window.plugin.notification.local){
//window.plugin.notification.local.cancelAll();
window.plugin.notification.local.add(opt);
}