For my users, I send a verification email in Firebase. The link that I receive is:
https://myprojectid.firebaseapp.com/...
When a user clicks the link I want to open my app and navigate to a specific screen. So here is what I have tried. Inside the manifest file I have:
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="myprojectid.firebaseapp.com"/>
</intent-filter>
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
I read here, that adding android:autoVerify="true"
will stop the disambiguation dialog to appear. But that isn't true. Here is also my NavHost:
NavHost(
navController = navController,
startDestination = Screen.SignInScreen.route
) {
composable(
route = Screen.SignInScreen.route
) {
SignInScreen{
navController.navigate(Screen.CheckScreen.route)
}
}
composable(
route = Screen.CheckScreen.route,
deepLinks = listOf(
navDeepLink {
uriPattern = "https://myprojectid.firebaseapp.com"
action = Intent.ACTION_VIEW
}
)
) {
CheckScreen()
}
}
When I click the link, I am still asked to choose between opening with Chrome or my app. How can I avoid that? Any help would be greatly appreciated.