I'm following the App Indexing API doc .
My app URI is android-app://com.mypackagename.app/intro/intro/
, so I add this to the manifest file, under <activity>
<activity
android:name=".MainActivity"
android:label="@string/config_app_name"
android:screenOrientation="portrait"
android:enabled="true"
android:exported="true"
>
<intent-filter android:label="test">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="android-app"
android:host="com.mypackagename.app" />
</intent-filter>
</activity>
But when go and test my deep link as said in Test your deep link on my phone, the link android-app://com.mypackagename.app/intro/intro/
can't be opened, there's a toast saying "there are no apps installed that can handle it"
What am I missing? Thanks
Update: in the documentation pointed out by Mattia, there's definitely an option to put whatever scheme, like 'example', but it doesn't work for me. I'm on Lollipop, if it makes a difference.
<intent-filter android:label="@string/filter_title_viewgizmos">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "example://gizmos" -->
<data android:scheme="example"
android:host="gizmos" />
</intent-filter>
Update 2: anything after the package is the scheme, in my case, android-app://com.mypackagename.app/intro/intro/
, it is intro
. Marked answer below