When I start to install myapp.apk, I get the below screen.
My app requires Location, External Storage permission. Above permissions are supposed to be requested from user as required i.e. just before the code which required these permissions.
Now , when app is installed I get a screen which say App doesn't require any special access as in the screen below. Why?
This is my permission code in Manifest file.
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.previders.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.ACCESS_DOWNLOAD_MANAGER" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
With Android 6.0, was introduced the new Android permissions runtime control. Shortly: on older devices all permissions were provided on install of app, from Android M needed permission is used only on runtime, when it is really needed, like Camera activity.
Are you overwriting app? This scenario happens when you already have app installed and installing same app or same app with new version.
If you don't have any new permission added in new app then it will show like that.
As Jadav Lalit already said:
if you install an app it will ask for the permissions it needs. This is also the case for installing, uninstalling and re-installing an app.
if you reinstall or install a newer version of the app without new permissions, it will not ask for any permissions.
On a side note, if you only need Location and External Storage permission you should only have ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION, READ_EXTERNAL_STORAGE and maybe WRITE_EXTERNAL_STORAGE.
You could also add ACCESS_LOCATION_EXTRA_COMMANDS since you use location.
Anyhow a complete list is here: https://developer.android.com/reference/android/Manifest.permission.html
They are all there and up to date, but the description can be a little short sometimes.
A more descriptive list is here: http://androidpermissions.com/ but seems a little out of date updated.
Related
In my Application I'm using expo-image-picker to pick image to update the user's profile picture.
I had done the implementation. while implementing I used CAMERA_ROLL as type to check the permissions for Gallery.
By Default Expo is includes all permissions link. I don't need that. I need to use only CAMER_ROLL as permission. I went through the app.json configuration docs but there, I can't find CAMER_ROLL or GALLERY related permissions.
What permission to be added in app.json for CAMERA_ROLL ?
You need to add these permissions to your AndroidManifest.xml file.
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
I also had similar scenario. CAMERA_ROLL permission is all about reading and writing to the storage memory. So, it requires below Android permission needs to be added in app.json
READ_EXTERNAL_STORAGE
WRITE_EXTERNAL_STORAGE
I uploaded my react-native app on PlayStore and I saw that my app "may request permission" to access location.
I do not use location services on application so I want it removed. Is there anyway to find out where location services are potentially used? AndroidManifest.xml does not mention any location services. How do I remove this permission?
I want the "may request access to Location" be removed from the permissions in Play Store when it is uploaded.
Try adding this to your AndroidManifest:
<uses-permission tools:node=”remove” android:name=”EnterPermissionNameHere” />
the important part is the attribute tools:node=”remove”this way it will try to remove the permission if its added from somewhere within the app. Just Make sure to replace "EnterPermissionNameHere" with the exact permission name for example "android.permission.ACCESS_FINE_LOCATION"
Maybe this will fix your problem
adding this
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.blah.blah">
.......
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" tools:node="remove" />
reference : https://support.google.com/googleplay/android-developer/answer/9888170
May be some of third party used locations services which you integrated in your app.
you should remove like this
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"
tools:node="remove" />
Increase apk version and upload in play store .if its not accept then go to appeal for playstore team manually.
for more details Refer Here
While releasing the apk to play store, I found out that the my app requires the android.hardware.telephony feature but I haven't added it in manifest anywhere. I have also check the merged manifest in android studio and it also does not contain this feature so I think no third party sdk is adding this. What could be the source of this feature?
For reference, I have following permissions declared in the manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Also, when I make it optional using below code, the app is available on devices without this feature:
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
So why is required by default without adding it anywhere?
Google Play automatically adds some features, depending on which permissions you have requested.
As you have requested READ_SMS and RECEIVE_SMS permissions, this implies you use the telephony feature. So, Google Play reacts as if you had the following in your AndroidManifest.xml:
<uses-feature
android:name="android.hardware.telephony"
android:required="true" />
When you manually add this and declare it required="false", this tells Google Play that whilst you do ask for the permission, you can handle the case where the user does not have the telephony feature.
This is confirmed via this note in the docs:
Note: Some system permissions implicitly require the availability of a device feature. For example, if your app requests permission to access to BLUETOOTH, this implicitly requires the FEATURE_BLUETOOTH device feature.
The full list of permissions and the feature requirements implied is available here, and includes your situation:
Finally, with your ACCESS_COARSE_LOCATION you are also declaring a feature requirement on android.hardware.location, just for your information.
There's also further detailed information over on the GameDev StackExchange.
One or more of the dependencies / modules / libraries your project is using is adding that requirement to your Android Manifest.
To investigate open your main Android Manifest file in Android Studio, and click on the Merged Manifest tab at the bottom of the page.
This will show you a view of the final merged Manifest, along with sources of each line.
Read more about this here: https://developer.android.com/studio/build/manifest-merge#inspect_the_merged_manifest_and_find_conflicts
HOW TO FIX
If you wish to avoid adding that requirement to your final Manifest, you can use Node Markers in your Manifest to control how the merge works.
Read more about Node markers here: https://developer.android.com/studio/build/manifest-merge#node_markers
e.g. try this:
<uses-feature
android:name="android.hardware.telephony"
android:required="false"
tools:node="replace" />
On the Google Play webpage for every application there is a permission section. Almost all of these applications uses some standard terminology to describe their permissions like "READ PHONE STATUS AND IDENTITY", "SEND SMS","FULL INTERNET ACCESS" etc. However on the Android Developer's page the permissions are listed as constants and their descriptions but not the standard terminology found at the Google Play webpage of the application.
For eg.There is a String Internet with the description Allows applications to open network sockets but not the FULL INTERNET ACCESS permission which is generally used for this description.
Is there some link which provides a mapping of the permission constants to these standard permission notation?
"READ PHONE STATUS AND IDENTITY" this is nothing but description about the permisson.U can get the Description about all permission using Packagemanger class in android.PermisionInfo is the class which will give u the Description-
PermissionInfo pinfo = packageManager.getPermissionInfo("Specify permisson constant", PackageManager.GET_META_DATA);
pinfo.loadLabel(packageManager).toString();
I guess you are looking for Manifest Permissions.
Which are defined in your project. Under AndroidManifest.xml
And a list if you need
Eg. for some common permissions
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
I noticed that there are two types of permissions in the manifest file, "permission" and "uses-permission" like the two shown below;
<permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
for the following 4 permissions which do I use when I put them in my manifest.xml file? uses-permissions or permissions?
android.permission.ACCESS_NETWORK_STATE
android.permission.ACCESS_WIFI_STATE
android.permission.INTERNET
android.permission.CHANGE_WIFI_MULTICAST_STATE
For
<permission>
The documentation states:
Declares a security permission that can be used to limit access to specific components or features of this or other applications.
Therefore, since you are accessing Android's permissions, you want uses-permission instead. The documentation for this element states:
Requests a permission that the application must be granted in order
for it to operate correctly.
<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), and <uses-permission> is used when your app actually needs a permission it doesn't have normally.
Lets start with "uses-permission...": Suppose you want to use GoogleMap in your application as an example to find a nearest location of any office such as bank or any other office. You need internet. So you need to give the permission to your android device to access INTERNET. This is done by using android permission called .
<uses-permission android:name="android.permission.INTERNET" />
Now come to "permission..": what it does is it Declares a security permission that can be used to limit access to specific components or features of this or other applications.If your application need some resources or some feature from other application, you can use by giving the specific class or package.
<permission android:name="com.example.project.DEBIT_ACCT" . . . />
Thanks. for more information, you can read
http://developer.android.com/guide/topics/manifest/manifest-intro.html
In short, the one you needed is the uses-permission statement.
Androird Document now has a dedicated page discussing these two usages.
In the Using Permissions part, it explains that
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.app.myapp" >
<uses-permission android:name="android.permission.RECEIVE_SMS" />
...
</manifest>
is used to declare what permissions you'd like to use.
While in Defining and Enforcing Permissions you can see that
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.me.app.myapp" >
<permission android:name="com.me.app.myapp.permission.DEADLY_ACTIVITY"
android:label="#string/permlab_deadlyActivity"
android:description="#string/permdesc_deadlyActivity"
android:permissionGroup="android.permission-group.COST_MONEY"
android:protectionLevel="dangerous" />
...
</manifest>
is used to define your own permission.
In layman terms, <uses-permission> specifies permissions your app needs to access some component restrict by another app that is the owner of that component.
<permission> specifies the restrictions you are placing on your components are the component owner.