I have application which use app links for login in the browser outside of the app and is redirected back after login is completed. This works fine with android native browsers but fails when I'm using Chrome Custom Tabs. User is logged in custom tabs and not redirected back to the app, so I wonder if is it possible to use app links with custom tabs in the same way as with the native browsers?
manifest configuration
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="my-host"
android:scheme="https" />
working implementation in native browsers
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
ContextCompat.startActivity(context, intent, null)
failing redirect using chrome custom tabs
val customTabsIntent = CustomTabsIntent.Builder()
.build()
customTabsIntent.launchUrl(context, Uri.parse(url))