According to the Android documentation (https://developer.android.com/reference/android/provider/ContactsContract.Profile.html), I need to request the android.permission.READ_PROFILE
permission to read the user's profile information.
However, when I attempt to create runtime permission request, there is no Manifest.permission.READ_PROFILE
I can use. Do I just use the Manifest.permission.READ_CONTACTS
permission instead?
Note: The AndroidManifest.xml file can find the permission just fine:
<uses-permission android:name="android.permission.READ_PROFILE" />
Requesting Android Runtime Permissions For this the following method needs to be called on every permission. checkSelfPermission(String perm); It returns an integer value of PERMISSION_GRANTED or PERMISSION_DENIED.
READ_PROFILE permission was removed on API 23 as you can see here
https://developer.android.com/sdk/api_diff/23/changes.html
You should ask for GET_ACCOUNTS, or any of the permissions belonging to the CONTACTS group
https://developer.android.com/guide/topics/permissions/requesting.html#perm-groups
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With