Saving Webview history/cache

Asked

Viewed 400 times

2

I’m building an app WebView, where the first screen is login. I would like the fields login and password could be recorded, so when the user closes the app those data were not lost.

1 answer

1

A possible solution, in the case of WebView, is you save the form data using the method setSaveFormData() using the public class Websettings. See below for an example:

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.