AndroidDev
AndroidDev

Reputation: 5555

Android deep link always opening in the Browser first and then the correct activity

On Android version 5.0 we are using Deep links since App links work only from Android 6.0 onwards. We are facing an issue on these devices: when the intent is launched from the Host app first the link is opening in the Browser and then after brief delay (2-3 seconds) it launches the target app even though we select the “Always Open in app” option. Is there anything we could do to open the link directly in the app without opening in the browser briefly?

    <activity android:name=".deeplinking.DeepLinkingNavigationActivity">
        <intent-filter android:priority="999”>
        <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="@string/deep_linking_host"
            android:pathPrefix="/authorize/" />
        </intent-filter>
    </activity>

Upvotes: 3

Views: 5849

Answers (1)

Dror Davidi
Dror Davidi

Reputation: 351

Actually you answered yourself correctly - the way to deep link in Android in version 5.0 is via URI schemes or Intents, and both require a browser redirect to do that. Therefore you'll have an intermediate browser that is opened (and cannot be avoided).

Pay attention that different browser will require different deep linking behaviour (URI Schemes, Intent, or even no support for deep linking at all).

Upvotes: 3

Related Questions