'Android instant app deeplink with custom scheme: UNKNOWN_URL_SCHEME
I have an SDK that registers an Activity to handle a custom scheme, at some point the SDK would open a http url to my website, upon clicking a button in the website, a user will be redirect to customscheme://scheme_host_url/their_application_id
- which would close the browser and redirect back to the user's native app using the SDK by opening CustomSchemeHandlingActivity
However if an instant app uses my SDK, this would not work, they will just see net:UNKNOWN_URL_SCHEME
in their browser. I think this is expected, as instant app doesn't really have my SDK and CustomSchemeHandlingActivity
installed locally.
Is it expected that this just won't work for Android instant app?
<activity
android:name=".CustomSchemeHandlingActivity">
<intent-filter>
...
<data
android:scheme="customscheme"
android:host="scheme_host_url"
android:path="/${applicationId}" />
</intent-filter>
</activity>
Solution 1:[1]
Instant Apps only work with App Links, and as you already know this means that you can only use https
urls.
https://developer.android.com/training/app-links/instant-app-links
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | mrequalizer |