Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android permissions GET_ACCOUNTS and USE_CREDENTIALS show up automatically

It has been quite a few months since I had time to work on my app. And today I downloaded latest Android Studio and SDK, I found a problem after I built the app.

My AndroidManifest file does NOT require any permissions on GET_ACCOUNTS or USE_CREDENTIALS, however they are shown as new added permissions when I tried to upload the app in Google Play store. I did use Google Play Games service in the game, but it was not like this before I did this update.

Does anybody know why? I Googled a while but could not find any clue..

like image 454
Qianqian Avatar asked Jun 08 '15 01:06

Qianqian


People also ask

What is android permission Get_accounts?

android.permission.GET_ACCOUNTS. Allows access to the list of accounts in the Accounts Service. The app uses this permission in an effort to find the device user's name when the support session is presented to a representative.

What is android permission Use_credentials?

permission. USE_CREDENTIALS. use accounts on the device. Allows the app to request authentication tokens.


1 Answers

If you recently updated, check to see if you switched to Google Play services 7.5 with a line in your build.gradle file such as

compile 'com.google.android.gms:play-services:7.5.0'

Google Play services 7.5 automatically adds required permissions - when you use com.google.android.gms:play-services - that says you are using every part of Google Play services, potentially adding more permissions than you intended.

Instead, you should selectively include what APIs you use by using separate dependencies such as:

compile 'com.google.android.gms:play-services-games:7.5.0'
compile 'com.google.android.gms:play-services-drive:7.5.0'

(Assuming you'd need Drive for Saved Games support)

like image 74
ianhanniballake Avatar answered Sep 21 '22 22:09

ianhanniballake