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
-1
votes
1 answer

How to migrate to API level > 22 in my Android app code?

I am trying to migrate legacy code of my customer's Android app source code. Since i am going for API level > 22 (26 to be exact), what are my options or ways to know all the places in the large codebase, where i need to put in code explicitly for…
-1
votes
2 answers

Android camera permission

I have this code which i make using official developer android sites. I want to create camera preview, but first ask for permissions. When i start the app they crash, but before app exit, they ask me for permissions which i grant, and then app…
Bendo
  • 11
  • 1
  • 3
-1
votes
5 answers

What's the right way to get permissions for phone call intent

How to request permissions using Kotlin. I am trying to make a phone call function fun buChargeEvent(view: View){ var number: Int = txtCharge.text.toString().toInt() val intentChrage = Intent(Intent.ACTION_CALL) intent.data =…
-1
votes
2 answers

Check Android Runtime Permissions from Settings

I have implemented Android Runtime Permissions in my Android App. I am also able to check if a permission is allowed or denied at runtime. But I want to know if there is anyway that if a user first denied Permission and then allowed it via app…
Mehul Kanzariya
  • 888
  • 3
  • 27
  • 58
-1
votes
2 answers

App is not working properly on marshmallow

I am making an app where user can send his location via sms by just clicking on a button. I tested this on phone running on android 5.1, it works fine but when I try to run it on marshmellow but it doesnt send the message. I guess its the because of…
Yash
  • 3
  • 5
-1
votes
2 answers

Android marshmallow app is not able read sms received broadcast and read from sms service provider.

Even I am granting run time permission for read sms, I am not able to received broadcast for incoming sms and Cursor return by Content Provider is also returning 0 data every time while reading sms inbox. Any idea why?
-1
votes
1 answer

How to give the runtime permission for read the OTP number for marshmallow?

This is the class by which I read the OTP number it works fine in all devices but in marshmallow it doesn't read the OTP number. I know that for resolving this issue it wants the runtime permission but I don't know how I can give the runtime…
-2
votes
1 answer

Android / Turning on dangerous permissions automatically without user's consultation

requestPermissions(permissionsToRequest.toArray(new String[permissionsToRequest.size()]), 101); In Android, after Marshmallow version, is there any way to turn on dangerous permissions like accessing device's fine location, camera or microphone…
-2
votes
1 answer

How to ask user for WRITE_SETTINGS and WRITE_EXTERNAL_STORAGE permissions

hop someone could help me , so I'm developing a ringtone app and I need to ask the user for WRITE_SETTINGS and WRITE_EXTERNAL_STORAGE permissions when he click on menu items (set default ringtone , alarme ...) here is my code for the custom adapter…
-2
votes
1 answer

Request Permission from Service App Crashes

I am trying to request if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission_group.LOCATION) != PackageManager.PERMISSION_GRANTED) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { …
-3
votes
1 answer

Android requestPermissions not showing dialog

I want to get bitmap by uri by: MediaStore.Images.Media.getBitmap(context.getContentResolver(), Uri.parse(uri)) but this code throw a exception says: java.lang.SecurityException: Permission Denial: opening provider…
-3
votes
1 answer

android 6.0 runtime permission is not working

I am working on runtime permission for the first time on android 6.0 and here is my code : String[] permissionsRequired = new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE, …
-3
votes
2 answers

checkSelfPermission function not accessing this as reference of current activivty

im giving reference of current activity using this pointer in checkSelfPermission method but this is showing following error 'checkSelfPermission(android.content.Context, java.lang.String)' in 'android.support.v4.content.ContextCompat' cannot be…
-3
votes
1 answer

Already request dangerous permission on android 6.0, and check it in setting=>app. but app still crash on android 6.0

My app crashes on android 6.0. i know it's caused by dangerous permission these is needed by ads network. I have already requested and agreed these permission, Write_external_storage, read_phone_state, needed in my app, but it still crashes. what…
1 2 3
20
21