Open boutier opened 1 year ago
Hey @boutier yes I should add that to the readme, this is how I did it in the demo. Another thing I can do is add a static method to request permission
Hi, thx @boutier for the code, it helps me a lot... it works till android 12. But 13 is not using WRITE_EXTERNAL_STORAGE permission anymore, so that permission is never set to true... and so scanner is never visible. Any help or suggestions on that? Pretty please :) I feel like I am the only one using this plugin. Thank You!
I had a few difficulties to make this plugin work (with angular). The last one was that I didn't think about explicitly asking camera permission to the user. I guess this should (at least) be mentioned in the README page.
I tried to create a fresh NativeScript app, with
ns create test --ng
and the mlkit packages above.And then I just had a black screen. But it worked from ns-preview. So I realized that ns-preview actually ask for camera permission, and so it worked after adding
@nativescript/camera
to my package.json and making something like:Notes:
(onLoaded)="$event.object.requestCameraPermission()
toMLKitView
.@ViewChild
Clearly, it would be great to add some documentation here https://github.com/NativeScript/mlkit/blob/main/packages/mlkit-core/README.md
I didn't propose a patch request because it may not be related to Angular only… but the angular section could be:
A last thing: thanks a lot for this plugin!