3

I am opening links like "https://forms.gle/formId" in Android Chrome CustomTabs. But Opening these Urls is redirecting to a Chrome Browser. How can I restrict to Open the redirect Url also in CustomTab itself instead of browser. In WebView , this can be handled by overriding shouldoverrideUrlLoading method. Below is the piece of code to Open Custom Tabs.

customTabsIntent.launchUrl(activity, Uri.parse("https://forms.gle/formId"));
Sasank Sunkavalli
  • 3,864
  • 5
  • 31
  • 55
  • 1
    I just ran into this issue myself, and it looks like the only solution is to pass the full redirected URL into the Custom Tab (instead of the shortlink). If you're hardcoding the `forms.gle` URL, you can hardcode the redirected URL instead. And if you're getting the `forms.gle` link at runtime, you can get the redirected URL using a background network call. – Dmitry Brant Oct 29 '21 at 14:09

0 Answers0