I've registered the following intent filter in my app's manifest:
<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:host="m.mycompany.de" android:pathPattern="/app/list" android:scheme="http" /> </intent-filter>
And created a simple html page to test if the app opens correctly:
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML> <HEAD> <TITLE> A Small Hello </TITLE> </HEAD> <BODY> <a href = "http://m.mycompany.de/app/list?param1=178¶m2=87294">Click</a> </BODY> </HTML>
On some devices (e.g. Nexus 5 running Android 5.1) clicking the link opens my app as expected, on other devices (e.g. Nexus 6 also running 5.1) the PlayStore (my app's page) is opened instead of my app.
Any ideas what the problem might be?
EDIT: Strangely, this 'bug' is gone when simplifying the URL to :
http://m.mycompany.de/list?param1=178¶m2=87294
and my intent filter to
<data android:host="m.mycompany.de" android:pathPattern="/app" android:scheme="http" />
which is not an option though because I don't have control over the URLs for my live app.
First, you specify the BROWSABLE category so your deep link can work in a browser. Without it, clicking the deep link on a browser won't resolve to your app. Second, the DEFAULT category lets your app handle implicit intents. If it's missing, the intent must specify the app component name for the activity to start.
When a user click an URL, it might open a dialog which asks the user to select one of multiple apps handling the given URL. On the other hand, An Android App Link is a deep link based on your website URL that has been verified to belong to your website. When user clicks that URL, it opens your app.
Yes, you can link from another app into your app, and only your app needs the Branch SDK integrated.
A Deep Link is a URL link that is generated, when anyone clicks on that link our app will be open with a specific activity or a screen. Using this URL we can send a message to our app with parameters. In WhatsApp, we can generate a deep link to send a message to a phone number with some message in it.
You can use pathprefix instead of android:pathPattern
<data android:host="m.mycompany.de" android:pathPrefix="/app/list" android:scheme="http" />
and in second case when you use below url,
http://m.mycompany.de/list?param1=178¶m2=87294
the data tag should be
<data android:host="m.mycompany.de" android:pathPrefix="/list" android:scheme="http" />
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