Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ACCESS_COARSE_LOCATION merged from play-services-base lib

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?

like image 997
Ohad Avatar asked Mar 15 '23 19:03

Ohad


1 Answers

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.0

Google Account Login com.google.android.gms:play-services-identity:7.5.0

Google Actions, Base Client Library com.google.android.gms:play-services-base:7.5.0

Google App Indexing com.google.android.gms:play-services-appindexing:7.5.0

Google App Invites com.google.android.gms:play-services-appinvite:7.5.0

Google Analytics com.google.android.gms:play-services-analytics:7.5.0

Google Cast com.google.android.gms:play-services-cast:7.5.0

Google Cloud Messaging com.google.android.gms:play-services-gcm:7.5.0

Google Drive com.google.android.gms:play-services-drive:7.5.0

Google Fit com.google.android.gms:play-services-fitness:7.5.0

Google Location, Activity Recognition, and Places com.google.android.gms:play- services-location:7.5.0

Google Maps com.google.android.gms:play-services-maps:7.5.0

Google Mobile Ads com.google.android.gms:play-services-ads:7.5.0

Google Nearby com.google.android.gms:play-services-nearby:7.5.0

Google Panorama Viewer com.google.android.gms:play-services-panorama:7.5.0

Google Play Game services com.google.android.gms:play-services-games:7.5.0

SafetyNet com.google.android.gms:play-services-safetynet:7.5.0

Google Wallet com.google.android.gms:play-services-wallet:7.5.0

Android Wear com.google.android.gms:play-services-wearable:7.5.0

like image 119
Tom Redman Avatar answered Apr 07 '23 05:04

Tom Redman