0

I'm trying to update my app to work with the new API23 and it's runtime permissions.

User can create an account for my application, and for this I've been using AUTHENTICATE_ACCOUNTS, MANAGE_ACCOUNTS, USE_CREDENTIALS and GET_ACCOUNTS.

GET_ACCOUNTS works fine and checkSelfPermission() returns GRANTED after requesting.

The problem is with other permissions (I couldn't find anything about this in the documentation). If I call shouldShowRequestPermissionRationale() on any of this permissions, I get an Exception.

And their status is always PERMISSION_DENIED, even if I request them and GET_ACCOUNTS is GRANTED.

I've read this question: Not all permissions in ACCOUNT permission group granted automatically, and it says it should work with the final Android 6.0 version, but unfortunately it doesn't.

How do these permissions work now? I am using an Emulator with Android 6.0 (I don't have an actual device with the M installed), so maybe that is the problem?

Community
  • 1
  • 1
fanboy555
  • 291
  • 2
  • 7
  • 20
  • are you sure emulator is having 6.0, because there was problem in emulator and they were not running in android 6.0 earlier. – dex Oct 16 '15 at 16:26
  • "And their status is always PERMISSION_DENIED, even if I request them and GET_ACCOUNTS is GRANTED" -- that is because they do not exist anymore: http://developer.android.com/reference/android/Manifest.permission.html You cannot ask for, let alone receive, a permission that does not exist. Have you tried just using `GET_ACCOUNTS` on Android 6.0? – CommonsWare Oct 16 '15 at 16:30

0 Answers0