Closed Jaymin-Bhadani closed 2 years ago
dont use webview from another process.
but we required webview for other process
so configure it to make it work on multiple processes if you need it to, its limitation of webview to run on main process only. Why do you need it to run on background process?
i guess you use some webview methods on application#onCreate - which is called for all application processes
i requred for MobileAds.initialize(this);
so limit this call to main process only. and dont call it on another processes
can you tell how i config for multiple process .?
any example do you have that i understand better way
if (ProcessUtils.isMainProcess(this)) { MobileAds.initialize(this); }
thanks for helping it saved my day
can it same work for custom webview which i created in xml for privacy policy load .?
sure
your activities are created only on main process. only application#onCreate is called on both
application#onCreate
if (ProcessUtils.isMainProcess(this)) { webView.loadUrl(Url); }
like this .?
do you call webView.loadUrl(Url); inside application onCreate method? if so yes
yes in activity#oncreate on btn click to load privacy policy
so its not in application#onCreate method. so you dont need to do this check
thanks for helping
Using WebView from more than one process at once with the same data directory is not supported. https://crbug.com/558377 : Current process com.test.test.test.test:my.custom.vpn