I'm trying to set cookies for CustomTabsIntent
:
val intent = CustomTabsIntent.Builder(mCustomTabsSession)
.setShareIdentityEnabled(true)
.build()
val headers = Bundle()
headers.putString("Cookie", "content-language=FR")
headers.putString("content-language", "FR")
intent.intent.putExtra(Browser.EXTRA_HEADERS, headers)
intent.launchUrl(context, Uri.parse(url))
but it's not working. When I open the web page from the app with this intent, I don't see this cookie in DevTools > Application > Cookies at all. Instead I see the following warning (not sure if it's connected to this issue though):
Third-party cookie will be blocked. Learn more in the Issues tab.
But when I click on the link redirecting to the Issues tab I can't find anything explaining this.
I've also tried to bind CustomTabsService
(via CustomTabsClient.bindCustomTabsService
), and it seems to be bound correctly, and also I've updated Digital Asset Links JSON file as described in the following docs:
, but still no luck - I still don't see this cookie in DevTools.
The url that is used to open the web page with intent within the app and the url within the Digital Asset Links JSON file are the same, I've checked that many times.
And the warning described above is still present - and I'm curious why, because I supposed that these cookies should be first-party cookie.
So what could be the cause of the issue? And how is it possible to fix it?