Camera permissions are ignored?


Currently my AndroidManifest.xml is :

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="" />
    <uses-feature android:name="" />

Now - When I’m using :

                width:           400,
                height:          400,
                keepAspectRatio: true,
                saveToGallery:   false

I get an error :

JS: Error -> Application does not have permissions to use Camera

But If I prepend this code :


Then I see the permission dialog and when approved , it does uses the camera


I explicitly declared camera permission in the manifest.
So why is it ignored ? What should I change in order for the permission in manifest to be respected ?
Showing the user a permission dialog each time - is very nonprofessional.


@Royi_Namir to use the camera on Android versions 5 and up (API 21+), you need to explicitly request permissions at runtime - which is why manifest declarations alone are not enough.

Now, I am not aware which camera plugin you are using, but you could use nativescript-permissions to check whether a permission is granted, and on consecutive calls only check the cached result, so you don’t have to ask the user each time.