Search code examples
javascriptandroidreact-native

Android Camera Permission - significant drop in the number of devices your apps supports


We have a live React Native Android application on the Play Store. In a recent update, I need to add camera permissions to the mobile app. I am using this package for image cropping: https://github.com/ivpusic/react-native-image-crop-picker. After uploading the update to the Play Store, I received a warning: 'This release will cause a significant drop in the number of devices your app supports on the following form factors: Car, Chromebook, Phone, Tablet. Devices not supporting camera hardware.'

The camera functionality is not mandatory in our app, but if a device has a camera, it should work. How can I achieve this?

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

This line added for permission


Solution

  • In your manifest add this

    <uses-feature
        android:name="android.hardware.camera"
        android:required="false" />
    
    <uses-feature
        android:name="android.hardware.camera.autofocus"
        android:required="false" />
    

    Indicating you dont need to have a camera to run the app