I'm using Android Studio to build my project, and after looking at the manifest-merger-debug-report.txt file, I see the following permission was added to my manifest:
ADDED from com.google.android.gms:play-services-base:7.5.0:22:13
uses-permission#android.permission.ACCESS_COARSE_LOCATION
It seems as if play-services lib merged the ACCESS_COARSE_LOCATION permission to my manifest. I am using the play services in order to support GCM in my library (play-services-gcm). I've been using the play-services lib for a long time, until the recent update of the lib, which seemed to add this permission for some reason. This is obviously not wanted on my end, as less users will trust my app.
Is there anyway I can still use the lib, without this unnecessary permission?
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.You may need to selectively compile just the Google Play Service APIs you need.
Here is a link to the separated libs, and here is the list as it was at time of writing:
Google+
com.google.android.gms:play-services-plus:7.5.0Google Account Login
com.google.android.gms:play-services-identity:7.5.0Google Actions, Base Client Library
com.google.android.gms:play-services-base:7.5.0Google App Indexing
com.google.android.gms:play-services-appindexing:7.5.0Google App Invites
com.google.android.gms:play-services-appinvite:7.5.0Google Analytics
com.google.android.gms:play-services-analytics:7.5.0Google Cast
com.google.android.gms:play-services-cast:7.5.0Google Cloud Messaging
com.google.android.gms:play-services-gcm:7.5.0Google Drive
com.google.android.gms:play-services-drive:7.5.0Google Fit
com.google.android.gms:play-services-fitness:7.5.0Google Location, Activity Recognition, and Places
com.google.android.gms:play- services-location:7.5.0Google Maps
com.google.android.gms:play-services-maps:7.5.0Google Mobile Ads
com.google.android.gms:play-services-ads:7.5.0Google Nearby
com.google.android.gms:play-services-nearby:7.5.0Google Panorama Viewer
com.google.android.gms:play-services-panorama:7.5.0Google Play Game services
com.google.android.gms:play-services-games:7.5.0SafetyNet
com.google.android.gms:play-services-safetynet:7.5.0Google Wallet
com.google.android.gms:play-services-wallet:7.5.0Android Wear
com.google.android.gms:play-services-wearable:7.5.0