Skip to content

Seeing bugs with angular property bindings #5

@cjohn001

Description

@cjohn001

@triniwiz
I played around a little with the new plugin. Unfortunately, I cannot get things working. I prepared a demo showing some of the issues I run into. You can find it here:

https://github.com/cjohn001/mlkit-test

The demo shows 2 different issues. I assume both has to do with the angular bindings which seem to not work as expected.

  1. Issue on IOS: The app runs and shows video, but it does not detect any barcodes. When debugging, I see that _onScanCallback(result) is called and holds a barcode. I see that the source of the problem is given in the following line:

if (this.detectionType === DetectionType.None || !this.onDetection) {

At that point this.detectionType and this.onDetection both have a value of undefined. I set both in the Angular bindings as you can see in the demo. I have not been able to figure out what is wrong with the attribute bindings, would be great if you could have a look into it.

  1. Issue on Android: When I try to run the demo app on Android, it directly crashes. Seems like the BarcodeFormat has an issue on Android.

System.err: Calling js method onCreateView failed
System.err: Error: com.tns.system.classes.loading.LookedUpClassNotFound: Class "io.github.triniwiz.fancycamera.barcodescanning.BarcodeScanner.BarcodeFormat" not found.
System.err:
System.err: StackTrace:
System.err: [barcodeFormats:setNative](file: src/webpack:/mlkit-test/node_modules/@nativescript/mlkit-core/index.android.js:233:0)
System.err: at applyAllNativeSetters(file: src/webpack:/mlkit-test/node_modules/@nativescript/core/ui/core/properties/index.js:1136:0)
System.err: at initNativeView(file: src/webpack:/mlkit-test/node_modules/@nativescript/core/ui/core/properties/index.js:1079:0)
System.err: at onResumeNativeUpdates(file: src/webpack:/mlkit-test/node_modules/@nativescript/core/ui/core/view-base/index.js:737:22)
System.err: at _resumeNativeUpdates(file: src/webpack:/mlkit-test/node_modules/@nativescript/core/ui/core/view-base/index.js:280:0)
System.err: at onLoaded(file: src/webpack:/mlkit-test/node_modules/@nativescript/core/ui/core/view-base/index.js:235:0)
System.err: at onLoaded(file: src/webpack:/mlkit-test/node_modules/@nativescript/core/ui/core/view/index.android.js:309:0)
System.err: at onLoaded(file: src/webpack:/mlkit-test/node_modules/@nativescript/mlkit-core/index.android.js:335:0)
System.err: at (file: src/webpack:/mlkit-test/node_modules/@nativescript/core/ui/core/view-base/index.js:318:0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions