I want to call a function in specific interval when my app goes into background. I have referred kitchen sink app for background task, but how to achieve this.
1 Answer
Accepted Answer
you can do something like this, as you gone through the kitchen sink app for background process.
so create a JS file say x.js, just do.
function myFunc() { //your code } //set the interval setInterval(myFunc,2000) //this will run the function for every 2 sec.//now in you
app.js
var service = Ti.App.iOS.registerBackgroundService({url:'x.js'});
you are good to go..
Your Answer
Think you can help? Login to answer this question!