目录

Scan Kit Manual Conversion Guide

Preparations

If you want your app to support Scan Kit, complete the integration preparation by referring to Preparations.

FirebaseVision.getVisionBarcodeDetector

Google API

To HMS API

FirebaseVision. getVisionBarcodeDetector()

new com.huawei.hms.ml.scan.HmsScanAnalyzer.Creator().create()

FirebaseVision.getVisionBarcodeDetector (com.google.firebase.ml.vision.barcode.FirebaseVisionBarcodeDetectorOptions options)

new com.huawei.hms.ml.scan.HmsScanAnalyzer.Creator().setHmsScanTypes(com.huawei.hms.ml.scan.HmsScanAnalyzerOptions options).create()

Note: options can be automatically converted. The input parameter can be reused.

To HMS API method sample:

HmsScanAnalyzerOptions options = new HmsScanAnalyzerOptions.Creator().create();
HmsScanAnalyzer analyzer = new HmsScanAnalyzer.Creator().setHmsScanTypes(options).create();