QR Code for launching a native application

后端 未结 2 1873
盖世英雄少女心
盖世英雄少女心 2020-12-03 09:04

2 questions about using a QR code in an Android device: 1. Is it possible to launch a native Android application from a QR code? Maybe by some configured URI schema? 2. Anot

2条回答
  •  旧时难觅i
    2020-12-03 09:45

    To scan barcodes in Android by Intent, see https://github.com/zxing/zxing/wiki/Scanning-Via-Intent

    To trigger an app from a QR code, yes, you need to register the app to handle the particular custom URL scheme. This is how the same app can respond to clicks on the web: https://github.com/zxing/zxing/wiki/Scanning-From-Web-Pages

    Look at how it registers to handle URLs here: https://github.com/zxing/zxing/blob/master/android/AndroidManifest.xml

提交回复
热议问题