NativeScript / nativescript-camera

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

requestPermissions should be blocking #125

Closed zzador closed 5 years ago

zzador commented 6 years ago

I'm calling "requestPermissions()" right away before I take a picture. However when I take the first picture after I started the developement session, android presents me 2 confirm-dialogs (camera permissions) while in the background my app is already presenting me an error message that I have not the permissions to use the camera. Only at the second try, when the permissions are already given the photo can be captured.

lini commented 5 years ago

The requestPermissions() method returns a promise. You must wait for the promise to resolve before trying to take a picture. We will update the documentation to better explain this.