Search code examples
androidcordovacordova-pluginsandroid-permissionsphonegap

How i can remove android.permission.CAMERA from cordova build?


When I build a cordova project it's adding android.permission.CAMERAA automatically. But I didn't added any plugin for this.

In that case, I am getting the following error message while uploading apk in google play

Your app has an apk with version code ... that requests the following permission(s): android.permission.CAMERA. Apps using these permissions in an APK are required to have a privacy policy set.

How I can skip adding android.permission.CAMERA?

Plugins I have used

$ cordova plugin cordova-plugin-dialogs 1.2.1 "Notification" cordova-plugin-inappbrowser 1.4.0 "InAppBrowser" cordova-plugin-network-information 1.2.1 "Network Information" cordova-plugin-splashscreen 3.2.2 "Splashscreen" cordova-plugin-whitelist 1.2.2 "Whitelist" phonegap-plugin-push 1.6.3 "PushPlugin"


Solution

  • Check you haven't got the camera plugin installed by using this command:

    cordova plugin ls
    

    If it is installed by accident you can remove it with this command:

    cordova plugin rm cordova-plugin-camera
    

    Even though you didn't install the plugin it may be a dependancy of another plugin you did install, so double check your app functions correctly if you do remove it.