Android deep linking not redirecting to play store

Viewed 3288

I have customized deep linking, it is working fine for users having the app. But for users not having the app, it doesn't redirect them to playstore.

<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="abc.in"
                android:pathPrefix="/abc"
                android:scheme="http" />
            <action android:name="android.intent.action.VIEW" />
</intent-filter>

MY Code for generating deeplink

public void Share() {
    firebaseAnalyticsUtil.fireEvent("shared_link");
    Intent sharingIntent = new Intent(Intent.ACTION_SEND);
    sharingIntent.setType("text/plain");
    sharingIntent.putExtra(Intent.EXTRA_SUBJECT,"Hey!");
    sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Share Text - "+"http://abc.in/abc/"+ID);
    startActivity(Intent.createChooser(sharingIntent,"Share using"));
}

Assist me to redirect user to playstore, if user does not have the app

3 Answers
Related