Android: Deep linking basics

Let's say you have an Activity in your manifest that has VIEW action and that's in the DEFAULT and BROWSABLE category:

<activity android:name=".TwoActivity">
        <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:path="/new" />

Note we have a new data tag. It has a scheme and a host and a path. It points to a URL.

Now if you make a <a> link to and press on it in your browser, it will open the above activity.

If you want to open the deep link programmatically you can:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(""));

Edit on github
comments powered by Disqus
Click me