Google Play Services automatically add new permissions

com.google.android.gms:play-services-ads:7.5.0

Issue

After upgrading Google Play Services from 6.1.11 to 7.5.0, bunch of new permissions are automatically added to the application's manifest.

Android Permissions

The app actually only uses Admob (Google Mobile Ads) libraries from Google Play Services and permissions such as "ACCESS_COARSE_LOCATION", "ACCESS_ACCOUNTS", "USE_CREDENTIALS" are completely unnecessary.

Resolution

Since Google Play Services version 6.5 you can selectively compile only APIs you intend to use, instead of compiling entire Google Play Services package into your app. This way only permissions required for these specific APIs will be added. In case of Admob Advertising, you should use:

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

That's instead of compile 'com.google.android.gms:play-services:7.5.0'

For more info check this Google Developers article.

Android Studio 1.2.2

 

 

Newsletter

Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait