Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Android phonegap application in background

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

like image 790
ramesh Avatar asked Sep 01 '12 17:09

ramesh


2 Answers

You will have to create a custom plugin in order to run processes in the background. You can find a plugin implementation here.

like image 157
Apostolos Emmanouilidis Avatar answered Sep 24 '22 02:09

Apostolos Emmanouilidis


In the onCreate method of your Java class that extends from DroidGap make sure you have set "keepRunning" properly.

        super.setBooleanProperty("keepRunning", true);
like image 25
Arivu Avatar answered Sep 24 '22 02:09

Arivu