My website needs to be logged in to use it, so is there a way to save login data for the users so they will not log in every time they enter the WebView, like f
I found the answer.
We just need to add this.webView.getSettings().setDomStorageEnabled(true); along with this.webView.getSettings().setJavaScriptEnabled(true);.
Now we can delete the cookies codes, and save data and logins.
EDIT: If it doesn't work, try not to delete the cookies code.
try to get values by javascript injection
webView.setWebViewClient(new WebViewClient(){
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
webView.loadUrl(
"javascript:(function() { " +
"var element = document.getElementById('hplogo');"
+ "element.parentNode.removeChild(element);" +
"})()");
}
});