I'm developing an android app.
Upon clicking a button, a deep-link is generated and shared with friends.
The problem is that upon clicking that shared deep-link, play store is getting opened even when the app is installed.
I followed this documentation.
Here's the intent-filter
:
<!-- [START link_intent_filter] -->
<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="example.com" android:scheme="http"/>
<data android:host="example.com" android:scheme="https"/>
</intent-filter>
<!-- [END link_intent_filter] -->
Here's how I'm creating the url (manually):
Uri BASE_URI = Uri.parse("https://domainname.com/");
packageName = getBaseContext().getPackageName();
APP_URI = BASE_URI.buildUpon().path(requestID.getText().toString().trim())
.appendQueryParameter("query1", query1.getText().toString())
.appendQueryParameter("query2", query2.getText().toString())
.appendQueryParameter("query3", query3.getText().toString()).build();
try {
String encodedUri = URLEncoder.encode(APP_URI.toString(), "UTF-8");
deepLink = Uri.parse("https://myappcode.app.goo.gl/?link="+encodedUri+"&apn="+holder.packageName+"&amv="+16+"&ad="+0);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
Here's the received deep-link/url: http://domainname.com/-KcldzAeJHrPS5tnfxTk?query1=query1&query2=query2&query3=query3
What could be wrong here?