Questions tagged [runtime-permissions]

This tag refers to Android runtime permissions introduced with Android 6.0 Marshmallow (API level 23). Previously permissions were granted on installation of an app. As of API level 23 permissions need to be requested at runtime.

Runtime permissions for Android were introduced in version 6.0 Marshmallow (API level 23).

The permissions are categorized into different protection levels and groups. For the dangerous level the permission must be requested at runtime, in contrast to normal permissions that are granted at install time. The user can revoke a previously granted permission anytime.

See also:

315 questions
7
votes
3 answers

Asking for permissions at run-time, Android M+

Firstly, I know this is a duplicate question, but I've been over the answers from other similar questions and haven't been able to find success with any of those solutions. I've developed an app which works perfectly on my testing device which is a…
Haris
  • 521
  • 1
  • 6
  • 14
7
votes
1 answer

Xamarin – Cannot override OnRequestPermissionsResult

I've got a class that extends Activity and implements IOnRequestPermissionsResultCallback. I want to use OnRequestPermissionResult and I coded it exactly as in XamarinBlog (section Handle Permission Request) and Monodroid Github but I always get no…
m93a
  • 8,866
  • 9
  • 40
  • 58
7
votes
1 answer

Android - Change READ_PHONE_STATE permission request message

I'm using the Android Marshmallow READ_PHONE_STATE permission and I would like to change the text that appears on the permission request. By default it shows: Allow [App name] to make and manage phone calls? But I'm using it to get the device id…
6
votes
1 answer

Retrieving GPS EXIF data from images using AndroidX ExifInterface?

I'm targeting Android 13 and using the new photo picker to retrieve images. E.g. val photoPicker = rememberLauncherForActivityResult( contract = ActivityResultContracts.PickMultipleVisualMedia() ) { uris: List -> handleUris(context,…
6
votes
2 answers

Allow Multiple Run Time Permission

I am writing a code to ask for multiple run time permission on Android 6.0. I have followed some good example codes, but ActivityCompat.shouldShowRequestPermissionRationale (context, READ_PHONE_STATE) is causing an error that the first argument…
6
votes
2 answers

How to centralize the run time permission when we have multiple activity

Sorry for my bad english. I have multiple Activity in my app, I need to centralize the runtime app permission. Do I need to use BaseActivity? If yes, please suggest me how to handle it in case of many Activity in app. If no, please suggest better…
Mubarak
  • 1,419
  • 15
  • 22
6
votes
1 answer

Camera permissions in Appcelerator

I'm using Appcelerator studio for developing my app. In this app I'm taking photos from camera and posting them to my server. For Android 6, I'm asking run time permissions from users for using camera. My code is working fine. But, when I ask…
6
votes
2 answers

How do I implelment Android 6.0 Runtime Permissions On Existing App

Problem: I have an existing app that I would like to implement Android 6.0's Runtime Permissions on. I have read a lot of different things on Runtime Permissions, but I just can't seem to wrap my head around all the different snippets. Nothing I…
dschuett
  • 300
  • 3
  • 13
5
votes
1 answer

Dangerous Permissions is auto granted at app install in new project [React Native - Android]

I have installed awesome project from react native cli and run it in android build. It works fine. When I added, below dangerous permission in my android manifest.xml and…
Rushabh Shah
  • 680
  • 4
  • 22
5
votes
2 answers

Activity.requestPermissions vs ActivityCompat.requestPermissions

Runtime permission dialog is shown in Android 6.0 or higher, so Activity.requestPermissions(...) which was added in API level 23 makes sense. But why is there another one (ActivityCompat.requestPermissions(...)) to be used for below Android 6.0?…
5
votes
1 answer

Tell if device is running a MIUI software

I need to know if my app is running on a MIUI device like XIAOMI at runtime due to issues like pre android 6.0 permissions etc. Is there a way to to do it?
roiberg
  • 13,629
  • 12
  • 60
  • 91
5
votes
1 answer

Android runtime permissions process: Can I send extras with ActivityCompat.requestPermissions?

Are there any methods to send bundle/extras (like what we do with intents) during a request for granting dangerous permissions of android? In normal process for granting dangerous permissions for android, we should call…
5
votes
2 answers

RequestPermissions not showing a dialog box

I found a lot of similar topics with the same threat but I still can't find a solution for my problem. I wrote this code to grant the writing permission to the app but there is no dialog box showing. I get in the monitor the No writing permission…
user567
  • 3,712
  • 9
  • 47
  • 80
5
votes
4 answers

Android 6.0 Permissions. Read SMS

I want to get the permission to read SMS in my App. This is my code: String permission = Manifest.permission.READ_SMS; if (ContextCompat.checkSelfPermission(getContext(), permission) != PackageManager.PERMISSION_GRANTED){ …
5
votes
3 answers

Understanding the Android 6 permission method

I am trying to take an image from Gallery and set it to an imageview but in Android 6 there are some permission problems. Below is the method to ask for the permission. Should I ask for read external storage or write external storage? Here is what I…
Umer Asif
  • 441
  • 1
  • 4
  • 15
1 2
3
20 21