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? Does this show runtime permission request dialog in lower versions?
What is the difference between
Activity.requestPermissions(permissions, requestCode)
and
ActivityCompat.requestPermissions(activity, permissions, requestCode)
Which one should I use?
ActivityCompat.requestPermissions()
and the device is 6.0 or higher? – Phototopography