breautek commented on issue #1150: URL: https://github.com/apache/cordova-android/issues/1150#issuecomment-1984012897
There is no way to prevent the app from being destroyed when it's entering the background. The OS may destroy the app activity for several reasons. If the app is in the foreground those reasons are limited, but it's far more likely for the OS to destroy the app once the app goes in the background. If the activity `onDestroy` is called (as shown in the OP stacktrace) it means the OS has decided to destroy the app. More information on the android life cycle can be read [here](https://developer.android.com/guide/components/activities/activity-lifecycle#ondestroy). Note that natively there are ways to serialize/store view state so that it can be recreated later during the `Create` life-cycle, however as far as I know, there is no way to serialize webview state. It is rather large issue with all webview-based applications. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org