0

我想知道在使用这些功能时是否有任何开发方法。我是否必须一遍又一遍地重新提交我的应用程序来测试这些设备功能?此外,我无法判断条形码扫描仪是否打开,更不用说我是否要尝试从 QR 码获取数据。

我想开始使用您开发的更多服务,我只是不知道如何在开发人员门户中使用它们。

谢谢

4

1 回答 1

0

Am I going to have to keep resubmitting my app over and over to test these device features?

No, you can utilize the BuildFire previewer app to test your code on an actual device. Just download the BuildFire previewer app from the App Store or Google Play Store.

I can't tell if the BarCode Scanner even opens, let alone if I were to try to get data from a QR Code.

The BuildFire SDK Wiki covers how to use the barcode scanning services. You can test your code using the Plugin Tester, which is part of the BuildFire SDK. If you need to test on an actual device, just use the BuildFire previewer, as mentioned above.

Here's sample code for calling the scanner API. The callback will either have a result or an error, to indicate success or failure.

buildfire.services.camera.barcodeScanner.scan(
   {
        preferFrontCamera : true, 
        showFlipCameraButton : true,
        formats : "QR_CODE,PDF_417", // default: all but PDF_417 and RSS_EXPANDED
    },
    function (result, err) {
        buildfire.notifications.alert("We got a barcode\n" +
            "Result: " + result.text + "\n" +
            "Format: " + result.format + "\n" +
            "Cancelled: " + result.cancelled);
    }
);
于 2017-11-02T14:48:35.460 回答