'Android deeplink redirection only opens browser, not app

We haven an Android app that should work as follows:

  1. User receives an email with deeplink to the app (we had to redirect using href because if not, email clients don't recognize myApp:// as a correct link). So, it's a normal link that redirects to myApp://token=blahblah
  2. User opens the link, link goes to Android default browser, opens the browser, URL redirects and calls the myApp://token=blahblah
  3. App gets the Intent, launches and gets the token. Then uses the token to Log in... etc

At 2), we have a problem, the link opens in the browser and that's it. The deeplink does not work, the flow stops there, at the browser.

On the other side, we have tested the url scheme with ADB, simulating an Intent with a mocked token, and it works perfectly. So there's something happening in the browser.

Finally, the exact same code is working for iOS. We are not sure of what is happening in the Android browser redirection

Any idea?

Thank you!



Solution 1:[1]

Just verify that your Android Manifest contains the following:

<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:host="sample.com"
                android:scheme="https" />
        </intent-filter>

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 Fusion Developers