Questions tagged [android-permissions]

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

3946 questions
18
votes
5 answers

Android, find all places in code to request permissions

I am working on an application for pre-Marshmallow devices. The source code was not written by me and the project itself is quite big. I am currently making the app to request permissions when needed. The question is: How to find all places in code…
geNia
  • 985
  • 9
  • 20
18
votes
2 answers

Marshmallow FINE and COARSE location permission

I'm trying to access ACCESS_FINE_LOCATION and if it cannot be found access ACCESS_COARSE_LOCATION. So I request for those 2 permission, but they give me the same dialog asking for location permission. I know those are both in the same group but…
Robin Dijkhof
  • 18,665
  • 11
  • 65
  • 116
18
votes
4 answers

Android: get user ID without requiring scary (for user) permissions?

In order to manage user preferences, at present I'm grabbing the google user name (effectively the email address they've registered to the device) and using (a hash of) that as a "user ID" to distinguish between different users. Something along the…
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181
17
votes
4 answers

Android Add in Manifest

I am pretty confused where to add the uses-feature tag in the manifest. I am using the camera in my app. I added permission but I'm confused where to add features in order to use front facing camera. Can you help?
Jana
  • 2,890
  • 5
  • 35
  • 45
17
votes
5 answers

Why I am receiving Warning - this app does not meet Google Play permissions policy, even though my latest version doesn't require these permission?

It show this message This app does not meet the Google Play permissions policy relating to the use of SMS or CALL_LOG. You must fix this before March 9. 2019 or your app will be removed from Google Play. Note: if you have recently made a change,…
Aman
  • 2,316
  • 3
  • 17
  • 23
17
votes
8 answers

Permission denied on writing to external storage despite permission

I have an Android 7.0 test device and my APK targets = "targetSdkVersion 22", with: with: final File f = new…
John Ashmore
  • 1,015
  • 1
  • 10
  • 25
17
votes
2 answers

Marshmallow permission implementation

I am trying to add Android 6.0 support in my Existing Android App. I have used SYNCADAPTER to sync data. its working fine till API 22. but in 23 (ANDROID 6.0) they have remove Group permission AUTHENTICATE_ACCOUNTS. I found sample how to get…
17
votes
4 answers

How to disable animations in code when running Espresso tests

Has anybody managed to disable animations through code when running Espresso tests? I've been trying to follow the instructions in this webpage (linked to from here): https://code.google.com/p/android-test-kit/wiki/DisablingAnimations…
16
votes
2 answers

Start foreground service after notification permission was disabled causes crash (Android 13)

So, I've been experimenting with the new Android emulators (namely Android 13 or Android Tiramisu, API 33) and on an app, I need a foreground service. The app's target SDK is currently 33. Due to the notification requirement, I've added the…
16
votes
7 answers

GrantPermissionRule Failed to grant permissions

I am writing a test class and I am trying to grant the permissions using the rule GrantPermissionRule: @Rule public GrantPermissionRule permissionsRule = GrantPermissionRule.grant( Manifest.permission.READ_EXTERNAL_STORAGE, …
amp
  • 11,754
  • 18
  • 77
  • 133
16
votes
2 answers

Permission always returns never_ask_again

Steps to replicate: react-native init project react-native run-android I called the function in onPress of a text component. The permission request always returns never_ask_again even for the…
snjmhj
  • 1,001
  • 11
  • 21
16
votes
0 answers

App restart when change permission in Android M?

I am developing an android app with structure: MainActivity->FragmentA->FragmentB->Fragment C Now in Fragment C,I go to Permission Setting and make access Camera to Deny,then I return an App.I realize that app restarted (transit to Fragment A). May…
do87
  • 197
  • 2
  • 8
16
votes
7 answers

Getting W/Activity: Can request only one set of permissions at a time

I made an app that have a request for camera and GPS, but when I execute I am getting this warning several times with less than 1 second of each other. W/Activity: Can reqeust only one set of permissions at a time) Can some one tell me…
16
votes
3 answers

What is the difference between shouldShowRequestPermissionRationale and requestPermissions?

I am building an app that requires user location. I am following the Android training documentation from here which says: shouldShowRequestPermissionRationale return the boolean indicating whether or not we should show UI with rationale for…
Sumit Jha
  • 2,095
  • 2
  • 21
  • 36
16
votes
2 answers

How Can the Settings App Start an App's Non-Exported Activity?

Android N lets you link an activity of yours into your app's page in Settings. Just add an for android.intent.action.APPLICATION_PREFERENCES. Android N's Settings app will look for the activity in your app that has that…
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491