I am developing an app using PhoneGap system. Currently when the user switch to another app and then come back to the app, it starts from scratch as if the user is opening it once again.
Now I have heard of the Service that android has but since my class is already extended, I cannot extend it with Service. Do you know of any solution that I can do to solve this small problem.
Currently my code is as follows:
public class MainActivity extends DroidGap {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.init();
super.setBooleanProperty("keepRunning", true);
super.setIntegerProperty("loadUrlTimeoutValue", 50000);
super.loadUrl("file:///android_asset/www/index.html",50000);
}
}
Thanks,
Keith Spiteri