title: How to set cookie in android WebView client
body: <p>I want to call one specific url via <strong>WebView</strong>. The page can only be called after user already logged in. I use <strong>AsyncHttpClient</strong> library to perform login call. Once after successfully logged in , loading url via <strong>WebView</strong> doesn't seem recognise the proper headers esp cookie. My suspect is that cookies are not sync correctly between <strong>HttpClient</strong> and <strong>WebView's HttpClient</strong> . Any idea why ? . Here is how i use <strong>WebView</strong></p>
  
  <pre><code>    final WebView webView = (WebView) content.findViewById(R.id.web_travel_advisory);
      String url = "http://mydomainurl.com/get_data_after_login";
  
      webView.setWebViewClient(new WebViewClient());
  
      CookieSyncManager.createInstance(getActivity());
      CookieSyncManager.getInstance().startSync();
      CookieManager.getInstance().setAcceptCookie(true);
  
      webView.getSettings().setJavaScriptEnabled(true);
  
      webView.loadUrl(url);
  </code></pre>
  
  <p>Appreciate ur help .</p>