unflagged.destination
unflagged.destination

Reputation: 1566

Deep link activity not opening

I am using below code to open an activity in my app

<intent-filter>
            <action android:name="android.intent.action.VIEW"></action>

            <category android:name="android.intent.category.DEFAULT"></category>
            <category android:name="android.intent.category.BROWSABLE"></category>

            <data android:host="google.com"></data>
            <data android:scheme="https"></data>
            <data android:pathPattern="/.*"></data>

        </intent-filter>

On typing google.com on browser its not opening my activity. Also I tried with other links but no lead. I tried on clicking through mails like Gmail etc but no success.

Am I missing something.

Thanks in Advance.

Upvotes: 1

Views: 482

Answers (1)

Eric Bachhuber
Eric Bachhuber

Reputation: 3952

Starting from API 23+, you need to have a file on the website/server you are using to link to your app which contains the package name of your Android application. This Digital Asset Links file verifies that the app is permitted to open links from the site in question. You also need to add android:autoVerify="true" to the intent-filter (which flags the OS to verify your app with the domain you're trying to deep link from when it's installed). Without this, you cannot deep link from http/https into your Android app. Custom schema links (such as myschema://data_here) still work without needing any verification.

For more information about Android app link verification, see here

Also, for future reference, Apple has the same verification requirements albeit with an apple-app-site-association file: see here

Upvotes: 1

Related Questions