mohsen24000
Member
Hi Dears
I have a problem in reuse WebView & WebViewExtras
I want to delete the cache after logging in and log in again with new session, but As long as the app is not closed and restarted, it is not possible to log in to the site again and the page will be loaded with the same previous session.
I would be grateful if you could advise how I can make the browser reusable
I have a problem in reuse WebView & WebViewExtras
B4X:
Dim WebVE As WebViewExtras
Dim webv As WebView
Dim WebViewClient1 As WebkitWebViewClient
webv.Initialize("")
pnlWebView.AddView(webv,0,0,pnlWebView.Width,pnlWebView.Height)
WebVE.Initialize(webv)
WebVE.JavaScriptEnabled = True
WebVE.addJavascriptInterface(ji, "B4A")
WebVE.SetWebViewClient(WebViewClient1.ToObject)
WebVE.GetSettings.SetAllowContentAccess(True)
WebVE.GetSettings.SetAllowFileAccess(True)
WebVE.GetSettings.SetAppCacheEnabled(True)
WebVE.GetSettings.SetCacheMode(WebVE.GetSettings.LOAD_DEFAULT)
WebVE.GetSettings.setDOMStorageEnabled(True)
WebVE.LoadUrl("https://xxxx.com")
B4X:
WebVE.JavaScriptEnabled = False
webv.JavaScriptEnabled = False
WebVE.ClearHistory
WebVE.ClearCache(True)
WebVE.FreeMemory
WebVE.PauseTimers
WebVE.LoadUrl("about:blank")
WebVE.SetWebViewClient(Null)
WebVE.SetWebChromeClient(Null)