📱 Android O -Permission Updates

Ramkumar N
2 min readJun 2, 2017

--

Let’s discuss about Android O Permission Updates

Android O

Android O Permission

As we discussed earlier in Android Permissions,previous versions of android (API level 24 and below) application requests permissions for access to resources and data which are not in the application’s own sandbox. the application requests for permission to the user at run time or installation time.these permissions belongs to some permission groups like CONTACTS,CAMERA etc. if the user allows that permission at the same time the rest of the permissions which belongs to the same group are also allowed for that application.for example when your application request READ_CONTACTS permission the user may allow that particular permission.but at the same time the application also grant other permissions(WRITE_CONTACTS) which are listed in the same permission group without the user knowledge.but Android O has a slight change in the Permission Behavior. let us consider the above situation, your application request READ_CONTACTS permission which belongs to CONTACTS permission group.when the user allow that permission,the application allows only that particular permission and the rest of the permissions are not allowed at that time.but at any time when the application needs other permission in the CONTACTS permission group,the required permission will be automatically allowed by the application itself.

Android O introduces new Permission related to PHONE Permission Group

đź“Ś ANSWER_PHONE_CALLS

“android.permission.ANSWER_PHONE_CALLS”

by using this permission your app can answer incoming phone calls programatically . to handle phone calls in your application you should use acceptRingingCall() method.

acceptRingingCall() -This method accepts phone call on behalf of the user.this method requires the following permissions MODIFY_PHONE_STATE(“android.permission.MODIFY_PHONE_STATE”)or ANSWER_PHONE_CALLS(“android.permission.ANSWER_PHONE_CALLS”)

đź“Ś READ_PHONE_NUMBERS

“android.permission.READ_PHONE_NUMBERS”

by using this permission application can allow read access to the devices phone numbers.this is the subset of the capabilities granted by READ_PHONE_STATE

READ_PHONE_STATE

Allows read only access to phone state, including the phone number of the device, current cellular network information, the status of any ongoing calls, and a list of any PhoneAccounts registered on the device.

here both the Permissions are classified as Dangerous Permission.

Hope you have enjoyed this post,Feel free to comment below for doubts or chat with me in Facebook or drop me e-mail for replies. Share is care.

--

--