0
我正在使用module'react-native-barcodescanner'來讀取條形碼,但只有QR碼可以被android手機掃描。如何在原生應用程序中讀取所有類型的條形碼。'react-native-barcodescanner'只讀QRCodes
我正在使用module'react-native-barcodescanner'來讀取條形碼,但只有QR碼可以被android手機掃描。如何在原生應用程序中讀取所有類型的條形碼。'react-native-barcodescanner'只讀QRCodes
圖書館工作正常,只有我們需要在橫向模式下掃描條形碼。
必須設置在構建語句Bacode格式一個接一個,
下面是支持的格式
BarcodeFormat.UPC_A
BarcodeFormat.UPC_E
BarcodeFormat.EAN_13
BarcodeFormat.EAN_8
BarcodeFormat.RSS_14
BarcodeFormat.CODE_39
BarcodeFormat.CODE_93
BarcodeFormat.CODE_128
BarcodeFormat.ITF
BarcodeFormat.CODABAR
BarcodeFormat.QR_CODE
BarcodeFormat.DATA_MATRIX
BarcodeFormat.PDF_417
像下面的例子
mReactInstanceManager = ReactInstanceManager.builder()
.setApplication(getApplication())
.setBundleAssetName("index.android.bundle")
.setJSMainModuleName("index.android")
.setFormats(BarcodeFormat.UPC_A)
.setFormats(BarcodeFormat.EAN_13)
.setFormats(BarcodeFormat.CODE_93)
.setFormats(BarcodeFormat.CODE_128)
.addPackage(new MainReactPackage())
.addPackage(new RNCameraViewPackage()) // <------ add here
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();
請問您能指導更多?哪個文件? – ARWIN
在掃描活動 使用的庫的主Java類 –