Android Intents with Chrome

You can launch apps directly from a web page on an Android device with an Android Intent. You can implement a user gesture to launch the app with a custom scheme or use the intent: syntax.

Construct an intent anchor and embed it within a page, so the user can choose to launch the app. This allows flexibility for how and when apps are launch, which means you can pass information to the app with Intent Extras.

The basic syntax for an intent-based URI is as follows:

   HOST/URI-path // Optional host  

Refer to the Android source code for parsing details.

When an intent isn't resolved or an external application doesn't launch, the user can be redirected to the fallback URL. You can specify a fallback URL with an Intent Extra:


Use S.<name> define Intent Extras. This particular extra is backwards-compatible. Chrome removes browser_fallback_url so the target app doesn't see this value.

Chrome won't launch an external application in the following cases:

  • The intent cannot be resolved. In other words, no app can handle the intent.
  • A JavaScript timer tried to open an application without a user gesture.


Here's an intent that launches the Zxing barcode scanner app:


To launch the Zxing barcode scanner app, encode your href on the anchor:

  <a href="intent://scan/#Intent;scheme=zxing;;end">
    Take a QR code

See the Android Zxing Manifest, which defines the package and the host.

When a fallback URL is specified, the full URL looks as follows:

   <a href="intent://scan/#Intent;scheme=zxing;;;end">
    Take a QR code

Now the URL sends users to if the app cannot be found, the link is triggered by JavaScript without user gesture, or other cases where we don't launch an external application.


If you invoke an Android Activity with an Intent that contains Extras, you can include these details, too.

Only activities with the category filter, android.intent.category.BROWSABLE can be invoked using this method, as it indicates that the application is safe to open from the Browser.

Chrome won't launch an external app for a given Intent URI if:

  • The Intent URI is redirected from a typed in URL;
  • The Intent URI is initiated without user gesture.