How to Add a New Intent Filter
Configure intent filters for deep linking in your Android app.
Intent filters allow your Android app to respond to custom URLs and deep links from other apps and web links.
Open AndroidManifest.xml
In Android Studio, navigate to your AndroidManifest.xml file, usually located at app/src/main/AndroidManifest.xml.
Add the intent filter
Inside the <activity> tag for your main activity, add an <intent-filter> element with the VIEW action, DEFAULT and BROWSABLE categories, and your URL scheme:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<application ... >
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Define your URL Scheme -->
<data android:scheme="myapp"/>
</intent-filter>
</activity>
</application>
</manifest>Replace myapp with the URL scheme value from your Grovs dashboard.
Add both URL schemes from the dashboard
Add both URL scheme values from the Grovs dashboard as separate <data> elements within the same intent filter:
<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="myapp"/>
<data android:scheme="myapp-test"/>
</intent-filter>Add both URL scheme values from the Grovs dashboard. Both are required for test and production environments to work properly.
Test with ADB
Build and install your app on a device or emulator, then use ADB to test the deep link:
adb shell am start -W -a android.intent.action.VIEW -d "myapp://example.com/path"Replace myapp://example.com/path with a test URL using the scheme from your Grovs dashboard. Your app should open and handle the link.