NativeScript / mlkit

Apache License 2.0
24 stars 9 forks source link

processEveryNthFrame on Android no results returned #44

Open brooklax opened 1 year ago

brooklax commented 1 year ago

@triniwiz apologies but I just tested with a new android build on my side and although I don't get an exception anymore like before, it also seems like adding the property now results in no results returned for the detection event. When I remove the property scanning works but it's not accurate with Code39 barcode types especially.

<MLKitView cameraPosition="back" :detectionType="type || 'all'" :barcodeFormats="formats" :processEveryNthFrame="60" @detection="onScanResult" :pause="pauseScanner" :torchOn="torchOn" />

devlinpadayachee commented 1 year ago

UpVote. Thanks @triniwiz. We really need a fix on this one.

devlinpadayachee commented 1 year ago

@triniwiz Good day Sir, this is affecting our business quite badly, please can we give this some attention? Thanks

triniwiz commented 1 year ago

@devlinpadayachee are you on v2 ?

brooklax commented 1 year ago

@triniwiz Devlin and work for the same company, we tried with:

"@nativescript/mlkit-barcode-scanning": "^2.0.0", "@nativescript/mlkit-core": "2.0.0",

No difference unfortunately, when I add processEveryNthFrame on Android it doesn't trigger the @detection event.

brooklax commented 1 year ago

@triniwiz anything I can do to make it easier to investigate this issue?

triniwiz commented 1 year ago

So only when using processEveryNthFrame it fails ?

devlinpadayachee commented 1 year ago

Hi, Yes Good Sir,

On IOS processEveryNthFrame works perfectly and returns results. When the processEveryNthFrame flag is added to Android it returns no results.

This is how we have implemented it:

<MLKitView cameraPosition="back" :detectionType="type || 'all'" :barcodeFormats="formats" :processEveryNthFrame="60" @detection="onScanResult" :pause="pauseScanner" :torchOn="torchOn" />

BR

brooklax commented 1 year ago

@triniwiz let me know if you need a sample app to help replicate

triniwiz commented 1 year ago

@brooklax my tests are usually done here

brooklax commented 1 year ago

hi @triniwiz , please clarify your previous message? I am offering to make a NS Vue app you could use to debug the issue?

harfyt commented 2 months ago

Hello, any update on this?

I' ve got these packages and when I add the property then scanning stops working (detection) not triggering

I test on Android platform (targetSdk 34)

"@nativescript/mlkit-barcode-scanning": "^2.1.0",
    "@nativescript/mlkit-core": "^2.1.0",

"@nativescript/angular": "^18.0.0",
    "@nativescript/core": "~8.8.0"
triniwiz commented 2 months ago

@harfyt with 8.8 you should try

"@nativescript/mlkit-barcode-scanning": "3.0.0-alpha.3",
"@nativescript/mlkit-core": "3.0.0-alpha.3",