Android Intents with Chrome

接著上一篇 LINE 貼圖網址傳回的資料分析 ,接下來要在 Android 的 WebView 裡開啟我們的App 或讓使用著去 Google Play Store 下載 App.

資料來源:Android Intents with Chrome


LINE 的使用範例:


Google 官方的使用範例:

Here’s an intent that launches the Zxing barcode scanner app. It follows the syntax thus:


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

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

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

Also, if fallback URL is specified, the full URL will look like this:

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

Now the URL will get you to if the app could not be found, or the link was triggered from JavaScript without user gesture (or for other cases where we don’t launch an external application.)


附註:如果你用的是 Cordova 請參考這一篇:


發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *