Skip to content

Seeing bugs with angular property bindings #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cjohn001 opened this issue Nov 23, 2021 · 4 comments · Fixed by #6
Closed

Seeing bugs with angular property bindings #5

cjohn001 opened this issue Nov 23, 2021 · 4 comments · Fixed by #6

Comments

@cjohn001
Copy link
Contributor

cjohn001 commented Nov 23, 2021

@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)

@triniwiz
Copy link
Member

The demo only has the base template

@cjohn001
Copy link
Contributor Author

@triniwiz: I am sorry, I do not understand. What do you mean with base template? I were speaking about the demo I wrote under the given link

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

@triniwiz
Copy link
Member

There is new code to check in the repo

@cjohn001
Copy link
Contributor Author

cjohn001 commented Nov 23, 2021

@triniwiz : I am sorry, I had forgotten to commit the latest changes. Now its there.
You are meaning I should not use
"@nativescript/mlkit-barcode-scanning": "^1.0.0-alpha.0",
"@nativescript/mlkit-core": "^1.0.0-alpha.0",

as there is new code in this repository? Hence, I should build the plugins myself to get the latest?

triniwiz added a commit that referenced this issue Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants