QR Code for launching a native application

后端 未结 2 1870
盖世英雄少女心
盖世英雄少女心 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条回答
  •  既然无缘
    2020-12-03 10:09

    1.to use a configured schema you can check this post

    Launch custom android application from android browser

    Then the you could QR code this scheme just like market://
    2. You could use Bar code scanner app and use below code to launch or you could even integrate the zxing library to scan yourself.

       Intent intent = new Intent("com.google.zxing.client.android.SCAN");
       intent.setPackage("com.google.zxing.client.android");
       intent.putExtra("SCAN_MODE",
                "ONE_D_MODE,QR_CODE_MODE,PRODUCT_MODE,DATA_MATRIX_MODE");
       startActivityForResult(intent, 0);
    

提交回复
热议问题