Is there any way (in PhoneGap) I can schedule events or callbacks to happen at designated times each day?
I guess I'm looking for something like Android AlarmManager, so that I can trigger some notification each day at a certain time, that would then prompt the user to launch my app.
You could use this:
https://github.com/katzer/cordova-plugin-local-notifications.git
It allows you to use local notifications of the device.
Once you have installed this plugin you gain access to the window.plugin.notification.local
variable. You can then run:
window.plugin.notification.local.add({
date: new Date(),
message: 'Your notification message'
});
This will set a notification to appear on the users device at the specified date.
I have used this with Moment JS to handle my timed notifications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With