Link back to Android app using intent-filter
This post covers a simple scenario where we have a web page (for example, on our organization’s mobile site) that we would like to link back to the mobile app.
In our AndroidManifest.xml, create an intent-filter element as follows:
1 2 3 4 5 6 | < intent-filter > < data android:scheme = "ourorg" /> < action android:name = "android.intent.action.VIEW" /> < category android:name = "android.intent.category.BROWSABLE" /> < category android:name = "android.intent.category.DEFAULT" /> </ intent-filter > |
If you place this under the main
Now the link ourorg:// will link back to the app.
There’s a lot more that you can do with the intent-filter. For now, we’re just covering a simple case here.
More information on intent-filter on developer.android.com