i went through all the issues i couldn't find one that even relates besides one on stackoverflow with no answer,
the MLKIT Barcode scanning doesn't emit a beep on scan
i tried various different devices, is it included in the plugin ? (source code says it's default to true)
or do i implement it on scanResult event
Hi! What makes you think that feature would be supported? If it was, I would have mentioned it in the docs.
Maybe I'm missing something, so please help me out here.
first of all thanks for all the effort you put in this amazing plugin.
i just thought it would be supported,
then i checked the barcodescanning-common.js file and i found
MLKitBarcodeScanner.prototype[exports.beepOnScanProperty.setNative] = function (value) {
this.beepOnScan = value;
};
exports.beepOnScanProperty.register(MLKitBarcodeScanner);
this made me think it is implemented and im just doing it wrong,
anyway what's the best way to play a sound ? im using ns with angular
do i need a plugin ? thanks again, and you can close this issue
Ah that makes sense. Yeah that property is there, but it's not implemented yet. That's also why it's not documented yet. I'll leave this open as a feature request. It's not too hard to add (did it before in the nativescript-barcodescanner plugin).
Code, demo and docs have been updated. Will release 8.1.0 to npm in a minute.
@EddyVerbruggen
you make great contributions to the nativescript community !! Thank You
Thanks, much appreciated!
I just tried moving from 8.0.0 to 8.1.0 and I think there's a regression. I get crashes on both Android & iOS. I'm not sure what the iOS crash was, but on Android I was had the benefit of a debug build which was showing me that an out of memory error that was happening.
It seems to crash immediately after scanning a barcode, and is more likely to crash if I've scanned more than one barcode. I tried disabling the new - very cool - beep feature by setting beepOnScan false, but the crashes still occur.
This is in a Vue app. The MLKitBarcodeScanner is gated behind a v-if conditional which leads to it being hidden after a barcode is scanned, and the paused property also gets set to true as soon as a barcode is scanned.
When I moved back to 8.0.0, the problem went away.
Many thanks for creating & maintaining this plugin - I'm incredibly grateful for all your hard work.
Also I noticed that in some cases I was getting a duplicate beep - I think the reportDuplicates feature that your other barcode scanning implementation had was likely to deal with this situation.
Most helpful comment
Code, demo and docs have been updated. Will release 8.1.0 to npm in a minute.