I am working on an application where I need to notifiy the user hourly for a set period of time. I am making this application in Titanium, so I can easily use the code for both Android and iOS.
For Android I am using this:
var intent = Titanium.Android.createServiceIntent({
url : 'alarmservice.js'
});
intent.putExtra('interval', MINUTE * 60);
Titanium.Android.startService(intent);
Which works fine, however this doesn't work for iOS. And if it works, the background task will keep running for a couple of minutes until it gets terminated. Is there any way to achieve that a task keeps running, like an alarm clock?
If this is not possible in Titanium itself, would it be possible in native code?
Any help is appreciated!