Wednesday, 15 September 2010

How to enable cookies in android webview? -


How do I enable cookies in the webview?

I tried to use CookieManager.getInstance () setAcceptCookie (right);

Just before calling WebView.loadUrl () and it does not work because I get an html page error from the website, saying that cookies need to be enabled.

The cookie manager knows which webview is known to enable cookies?

Say that I had an activity with two webviews in the screen and I wanted to enable only those webviews for a cookie, then the cookie manager?

I think I'm missing something? I did not find any method like webView.setCookieManager or Cookiemanager.setWebView (webview)

thanks

CookieManager for your whole application .STinstance () is cookie manager example. Therefore, you can enable or disable cookies for all webview in your application.

Normally this should work if your webview has already started:

Maybe you call CookieManager.getInstance (). SetAcceptCookie (true); Before launching your webview and this problem?

No comments:

Post a Comment