So I think I'm having almost an identical problem. If I run the test for the instant app from studio it will function as expected. If I look at my apps I see no icon representing the instant app ( though I know if I goto apps under settings it will exist ) If I then visit my URL it will launch the instant app. However If I clear out that app (settings->app->remove..) then visit the URL it just goes to the web site. I'm trying to launch the URL via text message. I'm unclear if its something to do with the code I've written or perhaps the structure of my AndroidManifest.xml file. I've tried several different examples to date. All seem to result in the same behavior. Also I've noticed to Try button exist on the play store. ( I did just today switch to a closed track testing ) I saw some of your other posts related to that. Seems its needs to be in Alpha for Try button to appear?
Questions:
Do you see anything wrong with the Manifest file below?
I'm using a sample from google for instant apps. Is there anything special about how to write the MainActivity in order for the instant app to trigger via a URL?
Were you able to solve your issue? I think you did, but I'm curious
Is your code up on git by chance? I'm simply trying to learn how to use instant apps and an example that is recent and functioning (simple too) would be great.
Thanks ahead of time. I can share more details if needed.
<!-- The following declaration enables this module to be served instantly -->
<dist:module dist:instant="true"></dist:module>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:targetSandboxVersion="2"
android:theme="@style/AppTheme">
<activity android:name="learn.instantapps.MainActivity">
<meta-data
android:name="default-url"
android:value="https://mysitemain" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter 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:scheme="https"
android:host="my site"
android:path="/main" />
</intent-filter>
<intent-filter 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:scheme="http"
android:host="my site"
android:path="/main" />
</intent-filter>
</activity>
</application>