Write WebView history / cache

2

I am mounting a WebView application, where the first screen is login . I would like the login and password fields to be saved, so when the user close the app this data would not be lost.

    
asked by anonymous 02.04.2017 / 20:57

1 answer

1

One possible solution, when dealing with WebView , is to save the form data using the setSaveFormData() method using the public class WebSettings . Here is an example:

WebView webView = (WebView) findViewById(R.id.webview);
webView.loadUrl("https://jonsnow.com/login");
WebSettings webSettings = webView.getSettings();
webSettings.setSaveFormData(true);
    
02.04.2017 / 22:20