How To Enable Cookies in Android Webview - Stack Overflow PDF
How To Enable Cookies in Android Webview - Stack Overflow PDF
How To Enable Cookies in Android Webview - Stack Overflow PDF
Stack Overflow
log in
13
android
webview
just before calling WebView.loadUrl() and it doesnt work as i get a html page error from a website saying cookies need to be enabled.
What i dont understand is how does cookieManager know which webview to enable cookies?
say if i had a activity with two webviews in the screen and i only wanted one of those webviews to enable cookies, how is that possible using a
CookieManager?
i feel like i am missing something? i could not find a method like webView.setCookieManager or Cookiemanager.setWebView(webview)
Thanks
share
1 Answer
16
Asked
Jun 21 '13 at 8:28
Order By
Votes
CookieManager.getInstance() is the CookieManager instance for your entire application. Hence, you enable or disable cookies for all the webviews in
your application.
Answered
Jun 21 '13 at 8:33
Edited
May 26 '14 at 2:45
cheers. works now after executing the code after i loadUrl jonney Jun 21 '13 at 9:26
My problem is that the webview does not send the cookie already living in the store. How do you make webview send the cookie? I am initializing webview after
CookieManager.getInstance().setAcceptCookie(true); Am I missing something? kalehv Aug 18 '15 at 16:19
add a comment
Your Answer
log in
or
Name
By posting your answer, you agree to the privacy policy and terms of service.
meta chat tour help blog privacy policy legal contact us full site
Download the Stack Exchange Android app
2016 Stack Exchange, Inc