-1

I want to check if app is installed then open app and if not then play store. I tried using my app's play store link but did not work

   <intent-filter
        android:autoVerify="true"
        android:label="Notification Log">
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data
            
            android:host="play.google.com"
            android:path="/store/apps/details?id=com.appnotification.notificationhistorylog"
            android:scheme="http" />
    </intent-filter>

Can anyone help me with this

ADM
  • 20,406
  • 11
  • 52
  • 83
Harshil
  • 57
  • 1
  • 8

2 Answers2

0

Updated

<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="www.this-so-does-not-exist.com"
        android:path="/something"
        android:scheme="http"
        android:pathPattern="/.*"/>
</intent-filter>

Then, links to http://www.this-so-does-not-exist.com/something will bring up your app (in a chooser, along with the Web browse) on devices that have your app, and will bring up your Web page on devices that do not have your app.

Nooruddin Lakhani
  • 7,507
  • 2
  • 19
  • 39
0

It worked by changing Playstore link to short Url

   <data

            android:host="bit.ly"
            android:path="/yourappname"
            android:scheme="http" />
Harshil
  • 57
  • 1
  • 8
  • This works but you can't get the data from the deeplink (long url). Did you manage to do that? e.g. if you are passing parameters – MadMac Jul 08 '22 at 03:12