0

Iam trying to publish my react-native applicaiton on Google Play Store and it shows that 0 devices are supported .

I managed to find the error "Doesn't support required feature - android.hardware.camera2 " from device catalog and followed all the solutions mentioned Android app is supported by 0 devices and many others.

Google Support Suggests that there is an issue with my AndroidManifest.xml which i am not able to figure out.

Here is my AndroidManifest.xml

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
              package="com.myApp"
              android:versionCode="16"
              android:versionName="1.0.16">

        <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
        <supports-screens android:largeScreens="true"
                          android:normalScreens="true"
                          android:smallScreens="true"
                          android:resizeable="true"
                          android:anyDensity="true" />

        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
        <uses-permission android:name="android.permission.CAMERA"/>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.RECORD_AUDIO"/>
        <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
        <uses-permission android:name="android.permission.VIBRATE"/>

        <uses-feature android:name="android.hardware.microphone" android:required="false"/>
        <uses-feature android:name='android.hardware.wifi' android:required="false"/>
        <uses-feature android:name='android.hardware.screen.portrait' android:required="false"/>
        <uses-feature android:name="android.hardware.camera" android:required="false"/>
        <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
        <uses-feature android:name="android.hardware.faketouch" android:required="false" />
        <uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>



        <application
                android:name=".MainApplication"
                android:label="@string/app_name"
                android:icon="@mipmap/ic_launcher"
                android:theme="@style/AppTheme">
            <activity
                    android:name=".MainActivity"
                    android:label="@string/app_name"
                    android:launchMode="singleTask"
                    android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
                    android:screenOrientation="portrait"
                    android:windowSoftInputMode="adjustResize">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN"/>
                    <category android:name="android.intent.category.LAUNCHER"/>
                </intent-filter>
                <intent-filter>
                    <action android:name="android.intent.action.VIEW"/>
                    <category android:name="android.intent.category.DEFAULT"/>
                    <category android:name="android.intent.category.BROWSABLE"/>
                    <data
                            android:host="myApp.auth0.com"
                            android:pathPrefix="/android/com.myApp/callback"
                            android:scheme="com.myApp"/>
                </intent-filter>
            </activity>
            <activity android:name="

com.facebook.react.devsupport.DevSettingsActivity"/>
        <service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT"/>
            </intent-filter>
        </service>
        <service android:name="io.invertase.firebase.messaging.RNFirebaseInstanceIdService">
            <intent-filter>
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
            </intent-filter>
        </service>
        <service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService"/>
    </application>
</manifest>

Here is my Build.gradle required information

android {

    compileSdkVersion 27
    buildToolsVersion "27.0.3"

    defaultConfig {
        applicationId "xyz"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 16
        versionName "1.0.16"
        vectorDrawables.useSupportLibrary = true
        // ndk {
        //     abiFilters "armeabi-v7a", "x86"
        // }
        multiDexEnabled true
    }
Aviral Garg
  • 93
  • 1
  • 2
  • 13

3 Answers3

2

If someone is facing this problem Add required=false in both camera and camera2 feature tag

  • and you should add condition if the device is not support those permissions to show friendly message for the users. – bebosh Aug 07 '23 at 10:43
0

For a start, you should not have a supports-screens element if you are just setting everything to true. It won't be the cause of your problem, but it is a mistake.

But looking at your app (I work for Google Play) it looks like you have resolved the issue yourself with the answer you give in the question.

Nick Fortescue
  • 13,530
  • 1
  • 31
  • 37
0

Check that any tags have valid values. If you misspelt camera for instance, or otherwise create a tag that does not have a valid name, you will get 0 devices supported.

https://developer.android.com/guide/topics/manifest/uses-feature-element#features-reference

Simon
  • 69
  • 4