Android Question WebView, Cookie and Javascript

Semen Matusovskiy

Well-Known Member
Licensed User
No. Javascript as it is works. Simply does not see cookies at all, unlike CookieManager getCookies returns correct values.
 

kisoft

Well-Known Member
Licensed User
You tried WebViewExtras
It's worth adding to manifest just in case
B4X:
SetApplicationAttribute(android:usesCleartextTraffic, "true")
 
Last edited:

Semen Matusovskiy

Well-Known Member
Licensed User
I tried to set cookies using Javascript (document.cookie = ...). This works fine.
So, my summary that I use incorrect parameters in CookieManager.getInstance().setCookie -https://developer.android.com/reference/android/webkit/CookieManager#setCookie(java.lang.String,%20java.lang.String)

I used the full path as URL (https://my.web.site/mypage.htm). Probably, WebView expects something else.
 
Top