Cookiemanager is returning different cookie parameters depending on the API

157 views Asked by At

I am trying to get the cookie from an URL using CookieManager.getInstance().getCookie(url). What I have noticed is that for Android 10 the cookie contains __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true however for lower APIs those parameters are missing. Where is the difference coming from?

In my case those parameters are absolutely necessary so as of right now I am adding manually for further requests. Is there a better way to solve this issue?

1

There are 1 answers

0
memt On

Maybe this is the same issue with Cookies containing the SameSite Attribute: CookieManager.getCookie() always returns null (Version <= API 28 (Pie))

Its a Bug in the underlying WebView Implementation.

https://bugs.chromium.org/p/chromium/issues/detail?id=780491