Question

I have implemented the shouldInterceptRequest method on WebViewClient. In there I am using HttpURLConnection to load the resources myself. To do this I have to set the cookies on the url connection. This is all working perfectly fine on android 4.3 and below however on kitkat it freezes because there is a deadlock on the CookieManager.getCookie(url). The issue is documented here https://code.google.com/p/android/issues/detail?id=65786

Anyways I could read the cookie on a thread or something prior to the call to shouldInterceptRequest but I need the url that is passed on shouldInterceptRequest so I just don't know what to do. Is it possible to implement cookie saving in some other way for the WebView?

Thanks.

Was it helpful?

Solution

See my reply on the bug: https://code.google.com/p/android/issues/detail?id=65786#c8. I'm curious to see if that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top