Keep a webview app of Android running in the background

24 views Asked by At

I observed that when a WebView app in Android is closed, it may continue running in the background under certain circumstances. For example, I have deployed a webapp that replicates databases from a remote CouchDB server to the local PouchDB, and I load the app into the Android WebView, such that when there are record updates in the CouchDB, the WebView can display the up-to-date records.

When the Android app is closed (home button pressed, etc.), it seems that the app is still fetching data from the CouchDB. This is what I want because I want the app to keep fetching data even when it is in the background, despite some potential performance issues. However, the app stops doing so after a while (probably after a few minutes).

Any method that the WebView app can never be terminated?

0

There are 0 answers