I am trying to send notifications everyday from my app using LocalNotification plugin that I found at github. I have the following code which sends a notification as soon as the application is started.
var notification = cordova.require("cordova/plugin/localNotification");
document.addEventListener('deviceready', onDeviceReady, false);
function onDeviceReady() {
alert('device ready');
var id = 0;
id++;
newDate = new Date();
newDate.setUTCHours(1,30,1);
notification.add({
id : id,
date : newDate,
message : "Your message here",
subtitle: "Your subtitle here",
ticker : "Ticker text here",
repeatDaily : true
});
}
But I want the application to automatically send notification without being opened. Setting the option repeatDaily to true will help ?
I did my research and found out that others were able to achieve it using the LocalNotification plugin.
I am not quite sure of how to test since it requires me to keep the AVD powered on for one full day. The objective is very simple. I need to send out a single notification everyday to a user without opening the app. Any help will be highly appreciated !! Thanks !!