NativeScript / nativescript-camera

NativeScript plugin to empower using device camera.
Apache License 2.0
92 stars 47 forks source link

Camera not working with Android 10 and singleInstance Launch mode #236

Closed flodaniel closed 4 years ago

flodaniel commented 4 years ago

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Describe the steps to reproduce it.

Open the camera and take a picture. The plugin will return the error "cancelled" This only happens on Android 10 with singleInstanceMode. Everything else works fine.

anthonywebster commented 4 years ago

i have the same problem :(

anthonywebster commented 4 years ago

i foud this answer: it seems like the one I didn't test was the one most obvious to test: saveToGallery: false.

const options: CameraOptions = { width: this.imageSize, height: this.imageSize, cameraFacing: 'front', allowsEditing: true, keepAspectRatio: true, saveToGallery: false // <-- this did the trick };

AdamAtri commented 4 years ago

pull request for fix: https://github.com/NativeScript/nativescript-camera/pull/237/commits/dc4b9ebb5729f17eb3c687120df36f34b86b702f