Android browser links aren't being redirected to the appropriate application

121 views Asked by At

I've implementing Google App indexing on android, my application handles some deep links. So I expect that appropriate links from browser should be redirected to my app. But that doesn't happen. Any clue?

1

There are 1 answers

1
Farhad On

You should configure the links that want to be opened with your app, correctly. Usually, you should add the following to your activity/service declaration in the AndroidManifest

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

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

            <data
                android:host="yourdomain"
                android:path="/yourpath/"
                android:scheme="yourscheme"/>
        </intent-filter>

Now the urls that start with "yourscheme" will be directly delivered to your activity, throughout an intent.

You can find more about deep linking here.