When I test instant app it works properly but after uploading on Play Store when I click on "Try Now button" app crash.
Here is my code when I click on Try Now button:
package com.journaldev.androidinstantapps.feature;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
public class ActivitySplash extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splashfeature);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://quickeselling.com/splash"));
intent.setPackage(getPackageName());
intent.addCategory(Intent.CATEGORY_BROWSABLE);
startActivity(intent);
}
}
In manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.journaldev.androidinstantapps.feature">
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<application>
<meta-data
android:name="asset_statements"
android:resource="@string/asset_statements" />
<activity
android:name=".ActivitySplash"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="default-url"
android:value="https://quickeselling.com/preview" />
<intent-filter
android:autoVerify="true"
android:order="1">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="quickeselling.com"
android:pathPrefix="/preview"
android:scheme="http" />
</intent-filter>
<intent-filter
android:autoVerify="true"
android:order="1">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="quickeselling.com"
android:pathPrefix="/preview"
android:scheme="https" />
</intent-filter>
</activity>
</application>
</manifest>
In URL mapping I have opened my main app through URL from splash. Here is the URL mapping image.
I tried a lot but din't know what's wrong. Please help me to solve this issue. Here is the crash log: