17

I am trying to add Android 6.0 support in my Existing Android App. I have used SYNCADAPTER to sync data. its working fine till API 22. but in 23 (ANDROID 6.0) they have remove Group permission AUTHENTICATE_ACCOUNTS.

I found sample how to get run-time permission, I tried same with AUTHENTICATE_ACCOUNTS but it is not working.

I also found one answer, Is there any trick to use AUTHENTICATE_ACCOUNTS same as that answer?

i found removed permissions list overhere. so if my app use that permission which is listed. in that case does any app works in Android M (6.0)?

Community
  • 1
  • 1
Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
  • 1
    "they have remove Group permission AUTHENTICATE_ACCOUNTS" -- what specific portions of the Android SDK were you using that required `AUTHENTICATE_ACCOUNTS`? Check the current JavaDocs, as you may not need that permission on API Level 23. – CommonsWare Oct 02 '15 at 00:05
  • @CommonsWare: i have used SyncAdapter to get data from backend that's why i need that permission. i am not facing any issue my app is running perfectly on 6.0. but i am trying to implement permission model for 6.0. so is it not necessary to get AUTHENTICATE_ACCOUNTS permission from user in 6.0 ? – Amit Vaghela Oct 02 '15 at 10:39
  • Try this it may be work stackoverflow.com/a/41221852/5488468 – Bipin Bharti Jan 03 '17 at 11:15

2 Answers2

6

There is no longer need AUTHENTICATE_ACCOUNTS on Android 6.0.

you can use android:maxSdkVersion="22" on your uses-permission element to stop requesting it as of Android 6.0.

As mentioned in comment by CommonsWare Sir and this blog helped to understand more on this issue.

Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
0

AUTHENTICATE_ACCOUNTS this permission no exist any more, as google project manager said.

Issue 2592: Requesting AUTHENTICATE_ACCOUNTS permission prompts to: 'Allow app to perform an unknown action'

We'll have to wait for a future preview revision to pursue this because the M revision 2 'key changes' section states: "Some accounts and identity permissions are moved to CONTACTS permissions group and others are removed or granted based on account type. In particular, android.permission.USE_CREDENTIALS, android.permission.MANAGE_ACCOUNTS, and android.permission.AUTHENTICATE_ACCOUNTS are ungrouped pending further changes in a later release." http://developer.android.com/preview/support.html

Paritosh
  • 11,144
  • 5
  • 56
  • 74