I want to be able to handle deep links like this :
appnm://typeA/12
appnm://typeA/42
appnm://typeA/99
....
appnm://typeB/43
appnm://typeB/092
appnm://typeB/....
Do I have to make two activities - for type A and for type B. Or can I handle both in one activity ? For example, would that work :
data android:scheme="appnm" android:host="" android:pathPrefix="/" />
when I type in some note on the phone "http:// ..." it automatically gives me the option to enter it like a link. However in my case "appnm://..." it doesn't. So how can I test the deeplink with a custom scheme ?
You can add mime types which will specify what kind of data is being deeplinked. If you want all deeplinks to go to the same activity, you just declare the intent filter within that activity with only the uri scheme. However, declaring a mime type can be used to direct different kind of data to different activities.
Does this clarify your doubt?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With