androidandroid-intentmanifestdeep-linkingandroid-intent-chooser

Android deeplink - don't show intent chooser popup, force open app


I want to open my app from browser, when user opens any link that my app handles. So I'm using deeplinking. Here's my code in manifest file.

<activity
            android:name=".ColorCaptureActivity"
            android:label="@string/title_activity_color_capture"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter android:label="DeepLink">
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <data android:scheme="http"
                    android:host="www.somelink.com"/>
            </intent-filter>
        </activity>

Everything fine, but when I click on the link, android shows intent chooser, where displayed all apps that can handle this intent. I understand it's the default behaviour, but is there a way to not show the chooser popup and open my app directly?


Solution

  • Try implementing App Links to set your application as the default handler for the links.

    Refer: https://developer.android.com/training/app-links#app-links-vs-deep-links