Questions tagged [android-permissions]

Permissions in the AndroidManifest.xml that allows an app to perform certain actions that are disallowed by default

3946 questions
97
votes
5 answers

When should I use ACCESS_COARSE_LOCATION permission?

I am building an Android app that will track the user's geolocation and draw their route on a map. I am using the Google Play Services location API, as described here. It is intuitive that my application requires the ACCESS_FINE_LOCATION permission,…
92
votes
2 answers

List of Android permissions normal permissions and dangerous permissions in API 23?

Which permissions need for requesting permissions at run time of API 23?
86
votes
4 answers

Listing permissions of Android application via adb

Using adb, how can I find out the which permissions an Android application requires? Because I want to display the permissions of multiple applications on different devices, viewing them in Google Play or Settings > Applications manager requires too…
Juuso Ohtonen
  • 8,826
  • 9
  • 65
  • 98
83
votes
12 answers

Android 12 New Bluetooth Permissions

Bluetooth is the main dependency of our app. So, We already try to implement new Android 12 Bluetooth permissions. Our only resource is Android developers New Bluetooth permissions in Android 12. There is just saying add…
82
votes
5 answers

java.io.FileNotFoundException: /storage/emulated/0/New file.txt: open failed: EACCES (Permission denied)

I've been trying to encrypt files and write those files back on to the same place. But I got the error message saying "java.io.FileNotFoundException: /storage/emulated/0/New file.txt: open failed: EACCES (Permission denied)". My Manifest file is…
Tharindu
  • 963
  • 1
  • 7
  • 9
73
votes
9 answers

Android M Camera Intent + permission bug?

I'm trying to get my app ready for the new Android M permissions changes and found some weird behaviour. My app uses the Camera intent mechanism to allow the user to get a picture form the camera. But in another activity needs to make use of the…
65
votes
10 answers

How Do We Distinguish Never-Asked From Stop-Asking in Android M's Runtime Permissions?

When it comes to the M Developer Preview runtime permissions, according to Google: If you have never asked for a certain permission before, just ask for it If you asked before, and the user said "no", and the user then tries doing something that…
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
63
votes
3 answers

What's the difference between access network state (ACCESS_NETWORK_STATE) and WIFI state (ACCESS_WIFI_STATE) permissions?

In Permissions tab of Android Manifest, in the drop down there are options called android.permission.ACCESS_NETWORK_STATE and android.permission.ACCESS_WIFI_STATE. What is the difference between them? Is ACCESS_NETWORK_STATE more generalized than…
JDroid
  • 633
  • 1
  • 5
  • 5
63
votes
1 answer

Push notifications (GCM) permission at runtime?

I have read that it is necessary to ask the user for some permissions at runtime for API 23 and up. For example: android.permission.ACCESS_FINE_LOCATION. Is it necessary (or even possible) to ask for a runtime permission for using GCM/push…
58
votes
5 answers

Android 13 - How to request WRITE_EXTERNAL_STORAGE

I am targeting my Android app for Android 13 (API 33) The WRITE_EXTERNAL_STORAGE permission seems to be working fine below API 33 i.e. Android 12 and less but the runtime permission popup for WRITE_EXTERNAL_STORAGE won't appear when running the app…
58
votes
11 answers

How to check MIUI autostart permission programmatically?

I need to check programmatically if the auto start permission for my app in MIUI phone is on or off. Facebook and whatsapp have this permission already enabled by default , how can I do so?
58
votes
3 answers

How do I use adb grant or adb revoke?

The Android documentation contains the following description of the adb grant and adb revoke commands. grant Grant permissions to applications. Only optional permissions the application has declared can be granted. revoke…
gabriel
  • 1,163
  • 2
  • 9
  • 15
56
votes
2 answers

Android 13 - READ_EXTERNAL_STORAGE_PERMISSION still usable

The behaviour changes for Android 13 mention this: If your app targets Android 13, you must request one or more new permissions instead of the READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE…
Christopher
  • 9,682
  • 7
  • 47
  • 76
56
votes
1 answer

SecurityException: not allowed to perform OP_READ_PHONE_STATE

User is reporting my app crashes with this error trace java.lang.SecurityException: com.android.phone from uid 10134 not allowed to perform OP_READ_PHONE_STATE at android.os.Parcel.readException(Parcel.java:1620) at…
kencorbin
  • 1,958
  • 1
  • 20
  • 18