title: how to save google login session android webView?
body: <p>i have an android app with a webView to open some youtube links but i have a problem that every time the app close and reopen i need to login again i read some questions here but didn't got an answer this is my code.</p>
  
  <pre><code>webView = findViewById(R.id.webView);
      String url = "https://www.youtube.com/watch?v="+vidInfo[vidNum][2];
      WebSettings webSettings = webView.getSettings();
      webSettings.setJavaScriptEnabled(true);
      webSettings.setDomStorageEnabled(true);
      webSettings.setAppCachePath(getCacheDir().getPath());
      webSettings.setAppCacheEnabled(true);
      webSettings.setMediaPlaybackRequiresUserGesture(true);
      webView.setWebViewClient(new WebViewClient());
      webView.loadUrl(url);
  </code></pre>