How do I open any app from my web browser (Chrome) in Android? What do I have to do with the A Href link?

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

   HOST/URI-path // Optional host

Parsing details available in the Android source.

To launch the ZXing barcode scanner app you can encode your href as follows:

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

  <a href="intent://scan/?;scheme=zxing;;end">Take a qr code = 10px x 10px</a><br>

  <a href="intent:play/?mediaset=android-phone-rtmp-high&amp;playlisturl=;scheme=bbcmediaplayer;;end">Launch BBC</a>

The Android manifest defines the scheme to be zxing, the package to be and the host data to be scan.

If the activity you are invoking via an intent contains extra data, these too can be included.

Only activities that have category filter android.intent.category.BROWSABLE are able to be invoked using this method as it indicates that the application is safe to open from the browser.

Leave a Comment