6

I try to get cookie information with CookieManager in Android WebView. However, all it does is providing a key value pair of cookies, no additional information.

I also tried this post and use connection.getHeaderFields.get("Set-Cookie"); to get all cookies received from server. But from what I can tell, I don't see all cookies that I am supposed to receive from server. This can also be found by some cookies in CookieManger receive a new value but not show in Set-Cookie field.

Ideally, I would like to intercept every response and inspect their cookies with all information from server such as name, value, max-age, secure, etc. Any suggestion how to do this with Android WebView (WebViewClient)?

Yao
  • 709
  • 2
  • 11
  • 22

0 Answers0