2
votes

I am getting cookie from the webservice and I want to store that cookie in a webview so that when I load the URL it automatically login the user. I am using Android Studio.

I have cookie in string format. I have tried CookieManager and CookieSyncManager but it is not working.

1

1 Answers

0
votes
WebView webView;
webView = (WebView)findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebViewClient(new WebViewClient());
webView.loadUrl("https://google.com");
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setDisplayZoomControls(false);
webView.goBack();