Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I override uses-feature and uses-permission

i have following permission in my project

<permission
    android:name=".com.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name=".com.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

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

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

But Google play show me some extra permission are also required then after searching I have come to know that these permission are in some of libraries am using in my project

enter image description here

so can any body help me to disable required permission like android.permission.CAMERA, android.permission.FLASHLIGHT and also uses-feature CAMERA, AUTOFOCUS and FLASH by overriding them in to my manifest file so that devices without flash light can also use the application. thanks

like image 231
Naveedumar Avatar asked Jun 17 '16 21:06

Naveedumar


People also ask

What is difference between permission and uses permission?

What is difference between permission and uses-permission in Android? permission is normally used when making a custom permission e.g. when making an app that other apps can tie in to, limiting access is a must. uses-permission is used when your app actually needs a permission it doesn't have normally.

What are the uses of permission?

Specifies a system permission that the user must grant in order for the app to operate correctly. Permissions are granted by the user when the application is installed (on devices running Android 5.1 and lower) or while the app is running (on devices running Android 6.0 and higher).


1 Answers

One of your libraries might me overriding your manifest. Try this

<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" tools:replace="required" />
like image 59
Visuddha Karunaratne Avatar answered Oct 28 '22 08:10

Visuddha Karunaratne