Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Release build removes camera permission

  • So based on the other thread, but completely different. I have figured out the issue. Doing a release build is removing the CAMERA permission in the AndroidManifest.xml. I am using this in the config.xml:

    <preference name="android-manifest/uses-permission/[@android:name='android.permission.CAMERA']/@android:name" delete="true" />
    <preference name="android-manifest/uses-permission/[@android:name='android.permission.READ_EXTERNAL_STORAGE']/@android:name" delete="true" />

    READ_EXERNAL_STORAGE makes it into the APK, but not camera. I verified this by decompiling the APK.

    I have confirmed this is an issue with Monaca remote build and the custom config plugin. Although the Monaca docs state the aforementioned code will work, the docs for the plugin state that remote builds will fail. Not certain the exact cause here, but I did a straight Cordova local build with the exact same plugins minus the Monaca ones and doing a release build works exactly like it is supposed too.

    Since I am using navigator.mediaDevices.getUserMedia as I need webRTC access, I am using this plugin to request permissions at runtime: There is some issue with the remote build and custom-config plugin that is removing the camera permission but not the others. Interesting bug none-the-less and local building with a traditional cordova project solves the issue.