Hi i am updating my application jaffna Temples . so that it can support Android M devices (v 6.0 and above).
Is there a way i can request multiple permission at a single time. eg: I want to get the permission to read phone state and location information at the same time.
Using this ways i can request permission one by one. But i want to rest both permission at once at the start of the application.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (checkSelfPermission(Manifest.permission.READ_PHONE_STATE)
!= PackageManager.PERMISSION_GRANTED) {
requestPermissions(new String[]{Manifest.permission.READ_PHONE_STATE},
PERMISSIONS_REQUEST_READ_PHONE_STATE);
} else {
setPhoneDetails();
}
}
Please give me some suggestions. Tnx.