mlkit icon indicating copy to clipboard operation
mlkit copied to clipboard

processEveryNthFrame on Android no results returned

Open brooklax opened this issue 2 years ago • 12 comments

@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" />

brooklax avatar Feb 24 '23 09:02 brooklax

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

devlinpadayachee avatar Feb 24 '23 22:02 devlinpadayachee

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

devlinpadayachee avatar Apr 13 '23 07:04 devlinpadayachee

@devlinpadayachee are you on v2 ?

triniwiz avatar Apr 13 '23 08:04 triniwiz

@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 avatar Apr 13 '23 12:04 brooklax

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

brooklax avatar Apr 14 '23 07:04 brooklax

So only when using processEveryNthFrame it fails ?

triniwiz avatar Apr 14 '23 07:04 triniwiz

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

devlinpadayachee avatar Apr 14 '23 07:04 devlinpadayachee

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

brooklax avatar Apr 14 '23 10:04 brooklax

@brooklax my tests are usually done here

triniwiz avatar Apr 15 '23 01:04 triniwiz

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

brooklax avatar Apr 18 '23 08:04 brooklax

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"

harfyt avatar Jul 26 '24 10:07 harfyt

@harfyt with 8.8 you should try

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

triniwiz avatar Jul 26 '24 18:07 triniwiz