Hi!
When Android app is running and I press home button or back button, my app is paused and then stopped. When I click app icon again, the app is started again. Here are the logs:
D/CordovaTest(15428): onStart
D/DroidGap(15428): Resuming the App
D/DroidGap(15428): Paused the application!
D/CordovaWebView(15428): Handle the pause
D/CordovaTest(15428): onStop
D/CordovaTest(15428): onStart
D/DroidGap(15428): Resuming the App
The "funny" thing is that when my app is running in the foreground and it receives a push notification (I'm using Urban Airship for that) and I pull down the notification panel and click the notification (while my app is still running in the foreground), my app is also restarted...
When I lock/unlock my phone, it only pauses/resumes the app without restarting it, so at least that part works fine.
Is there any way to prevent Android from always stopping the app when it's moved to the background? I understand that occasionally apps may be stopped by OS when memory is getting low or something, but it happens *always* on Samsung Ace running 2.3.6 with 278 MB RAM *and* Nexus 7 running 4.2.1 with 1GB RAM... I'm using Cordova 2.2.0.
Cheers,
Szymon