'expo duplicate activity with scheme

I'm using expo version 42 and expo-app-auth to login users with google.

on the generated apk it creates an activity with my defined scheme like this.

    <activity android:exported="true" android:name="net.openid.appauth.RedirectUriReceiverActivity">
        <intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <data android:scheme="myapp"/>
        </intent-filter>
    </activity>

I also use expo-linking to create deep links to my app with the same scheme

but when I open a link like myapp://payment android asks the user to choose the activity as there is more than on activity with this scheme.

how can i solve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source