Month: January 2016

Android marshmallow Runtime Permissions

Dangerous permissions need to be granted explicitly

1
2
3
4
5
6
7
8
9
Activity.this.requestPermissions(new String[]
{
Manifest.permission.RECORD_AUDIO
,Manifest.permission.READ_CONTACTS
,Manifest.permission.WRITE_CONTACTS
,Manifest.permission.READ_EXTERNAL_STORAGE
,Manifest.permission.WRITE_EXTERNAL_STORAGE
}
,REQUEST_PERMISSION);

Table 1. Dangerous permissions and permission groups.

Permission Group Permissions
CALENDAR
CAMERA
CONTACTS
LOCATION
MICROPHONE
PHONE
SENSORS
SMS
STORAGE

Defining and Enforcing Permissions

Tags :