The webview of my app won't store cookie so that I have login again if I restart my app.
To store cookie, what should I add to this codes?
Can anyone show me with code using my original code?
public class MainActivity extends Activity {
private ActionBar mActionBar;
private SimpleSideDrawer mNav;
WebView myWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myWebView = (WebView)findViewById(R.id.webView1);
myWebView.setWebViewClient(new WebViewClient());
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.loadUrl("http://example-site.com");
myWebView.getSettings().setSupportZoom(true);
myWebView.getSettings().setLoadWithOverviewMode(true);
myWebView.getSettings().setUseWideViewPort(true);
.....
}
....
}