I’m using the following code to launch a login page in my Flutter app via native Android code using CustomTabsIntent:
val customTabsIntent = CustomTabsIntent.Builder().build()
customTabsIntent.launchUrl(this, Uri.parse(loginUrl))
I want to manage cookies for the browser session opened using CustomTabsIntent. Specifically:
Add cookies (e.g., session tokens) before launching the URL.
Delete specific cookies or clear all cookies after the session.
I came across CookieManager in Android’s WebKit, but I’m unsure how to integrate it with CustomTabsIntent. Could someone guide me on how to:
Set cookies before launching the URL.
Delete existing cookies or clear cookies programmatically.
Top comments (0)