Reputation: 4082
I am developing an android application in Phonegap, cordova.. I had a button in the application, while clicking in that I need to run the application in the background and
need to call a web service at the interval of 15 mins.
Is it possible in phone gap, cordova proj...
I am new to this..Please help
Upvotes: 6
Views: 8687
Reputation: 880
As of phonegap 3+, there's a plugin to add this functionality to your application, here's the link to the plugin project and instructions, should work for cordova, phonegap and phonegap build:
Upvotes: 1
Reputation: 119
In the onCreate method of your Java class that extends from DroidGap make sure you have set "keepRunning" properly.
super.setBooleanProperty("keepRunning", true);
Upvotes: 1
Reputation: 7197
You will have to create a custom plugin in order to run processes in the background. You can find a plugin implementation here.
Upvotes: 6