an old jelly beam here...it doesn't work
In order to improve app stability and data integrity in Android 9, apps cannot share a single WebView
data directory among multiple processes. Typically, such data directories store cookies, HTTP caches, and other persistent and temporary storage related to web browsing.
In most cases, your app should use classes from the android.webkit
package, such as WebView
andCookieManager
, in only one process. For example, you should move all Activity
objects that use a WebView
into the same process. You can more strictly enforce the "one process only" rule by calling disableWebView()
in your app's other processes. This call prevents WebView
from being initialized in those other processes by mistake, even if it's being called from a dependent library.
If your app must use instances of WebView
in more than one process, you must assign a unique data directory suffix for each process, using the WebView.setDataDirectorySuffix()
method, before using a given instance of WebView
in that process. This method places web data from each process in its own directory within your app's data directory.