Android Handling Deep Links Multiple domains and multiple paths

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

AndroidManifest.xml:

<activity android:name="com.example.MainActivity" >

    <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:scheme="http"
              android:host="www.example.com" />
    
        <data android:scheme="http"
              android:host="www.example2.com" />
    
        <data android:path="/" />
        <data android:path="/map" />
    
    </intent-filter>

</activity>

This will launch your MainActivity when the user clicks any of these links:

  • http://www.example.com/
  • http://www.example2.com/
  • http://www.example.com/map
  • http://www.example2.com/map


Got any Android Question?