Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uses-feature android:required="false" being ignored

in my AndroidManifest.xml file, I have these 2 lines:

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

But then when I upload to Google Play, it indicates that the camera is required. And if i use the aapt tool, it shows: "uses-feature: name='android.hardware.camera'"

Does anyone know why it is ignoring my code and requiring the device to have a camera?

Edit: Here's my entire "uses" section for reference:

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

<uses-permission                        android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:required="false"  android:name="android.hardware.WRITE_EXTERNAL_STORAGE" />

<uses-permission                        android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-feature android:required="false"  android:name="android.hardware.READ_EXTERNAL_STORAGE" />

<uses-permission                        android:name="android.permission.READ_PHONE_STATE"/>
<uses-feature android:required="false"  android:name="android.hardware.READ_PHONE_STATE"/>

<uses-permission                        android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-feature android:required="false"  android:name="android.hardware.ACCESS_NETWORK_STATE"/>

<uses-permission                        android:name="android.permission.INTERNET" />
<uses-feature android:required="false"  android:name="android.hardware.INTERNET" />

<uses-permission                        android:name="android.permission.FLASHLIGHT" />
<uses-feature android:required="false"  android:name="android.hardware.FLASHLIGHT" />

<uses-permission                        android:name="android.permission.VIBRATE" />
<uses-feature android:required="false"  android:name="android.hardware.vibrate" />

<uses-permission                        android:name="android.permission.CALL_PHONE" />
<uses-feature android:required="false"  android:name="android.hardware.CALL_PHONE"/>

<uses-permission                        android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission                        android:name="asn.apps.asncrm.permission.C2D_MESSAGE" />
<uses-permission                        android:name="com.google.android.c2dm.permission.SEND" />
<uses-permission                        android:name="android.permission.WAKE_LOCK" />

<uses-feature android:required="false"  android:name="android.hardware.telephony"/>
like image 760
JeffT Avatar asked Nov 04 '15 00:11

JeffT


1 Answers

Try adding this additional tag to your Android manifest:

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

This reason for this is that, according to the docs, the android.permission.CAMERA permission implies the following 2 features are required: android.hardware.camera and android.hardware.camera.autofocus.

[EDITED]

Also, if you have any <uses-library> tags in you manifest, one of the libraries may require a camera feature.

like image 130
cybersam Avatar answered Oct 26 '22 08:10

cybersam