0

I have added support for deep links to my android app and have added the appropriate intent filters. If I click on a weblink in a browser and I support that url, a chooser will been shown with my app listed.

But what I want now is add a html link to my website so when the users clicks in it, it opens my app (with the url sent) without showing the chooser. But if the user doesn't have the app installed then it should open the app PlayStore page.

Please do you know how I could do that?

X09
  • 3,827
  • 10
  • 47
  • 92
  • This is a duplicate. http://stackoverflow.com/questions/12856773/detect-if-android-app-has-been-installed-on-the-device-using-a-mobile-web-page – David S. Oct 18 '16 at 20:04

1 Answers1

0

you should Try to open it like myapp://returnApp/?status=1 (add trailing slash character). This is happens because path parameter is defined with default value of /.

Unfortunately, you can't match exactly for empty string. As documentation states:

Note : - The path part of a URI which must begin with a /.

you really in need to start app with exactly url myapp://returnApp?status=1 you can add android:pathPattern=".*" parameter to your data clause like

  <intent-filter>

  <data android:host="returnApp" android:scheme="myapp"  android:pathPattern=".*"></data>
  </intent-filter>

Intent filter with data android:pathPattern=".*" will match for any paths including empty one.

bvnn
  • 11
  • 3