Chrome intents are the deep linking replacement for URI schemes on the Android device within the Chrome browser. Instead of assigning window.location or an iframe.src to the URI scheme, in Chrome, you’ll need to use their intent string as defined in this document. While it adds complexity, the Chrome intent is actually a powerful tool since it automatically handles the case of the mobile app not being installed. Here’s the redirect logic baked into the Chrome intent:
This means that if you use the Chrome intent, you do not need to handle the case of the app not being installed like you do with the URI scheme.
Configuring your app for a Chrome intent is the same as configuring for a URI scheme, since Chrome uses it under the hood. You need to pick an Activity within your app that you’d like to open when the URI scheme is triggered and register an intent filter for it. Add the following code within the
You can change your_uri_scheme to the URI scheme that you’d like. Ideally, you want this to be unique. If it overlaps with another app’s URI scheme, the user will see an Android chooser when clicking on the link. You see this often when you have multiple browsers installed, as they all register for the HTTP URI.
In Chrome, you cannot use the basic URI scheme to open up the app; instead you will need to issue the formatted Chrome intent string. Here’s an example Chrome intent structure:
intent://path#Intent;scheme=URI Scheme;package=package name;S.browser_fallback_url=fallback url
Here are the variables you can use for the string:
No terms matched that search.