문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top