我搜索了很多,但是找不到解决方案,所以... 如何保存我的登录信息,这样我每次进入应用程序时都不必注册?
public class MainActivity extends AppCompatActivity {
private WebView myWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myWebView = (WebView) findViewById(R.id.webView);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
myWebView.setWebViewClient(new WebViewClient(){
@Override
public void onPageFinished(WebView view, String url) {
//This part doesn't do what
String cookies = CookieManager.getInstance().getCookie(url);
}
});
myWebView.loadUrl("https://www.iepp.es/nuevo/");
}
}