mevqz
mevqz

Reputation: 663

Google Play Game Service adds an unwanted permission in my app (Phone status and Identity)

I am using Google Play Game Service and the BaseGameUtils lib in my game, but it adds the Permission "Read Phone Status and Identity" in my app. Is this strictly necessary? I have seen other apps that makes use of the Google Play Game Service without requiring that permission.

The build.gradle of the BaseGameUtils compile against "com.google.android.gms:play-services-games:8.1.0" API. (It also compiles with play-services-plus but this is not causing the problem)

I have tested with older/newers versions (7.5.0 / 8.4.0) but its the same.

Thanks in advance.

EDIT:

I also check the required permissions required by the play-services-games in the Manifest for the component: ANDROID_SDK/extras/google/m2repository/com/google/android/gms/play-services-games/7.5.0/play-services-games-7.5.0.aar but it has not "uses-permission" tags. (What permissions are needed by each Google Play Services component?)

EDIT#2: My Solution was to remove it explicitly in the app Manifest using this line:

<uses-permission android:name="android.permission.READ_PHONE_STATE"
tools:node="remove"/>

I found that neither of both APIs adds me none permission, but apparently when I compile with the BaseGameUtils it does (despite that the BaseGameUtils's Manifest adds none permission). It is really weird

Upvotes: 1

Views: 940

Answers (1)

Clayton Wilkinson
Clayton Wilkinson

Reputation: 4572

Play Game Services definitely does not require any permissions (Implicitly is uses the internet permission to communicate with the server). An now the latest version of play-services-games (8.x) does not have dependencies on plus either.

To confirm, I suggest building one of the samples from Android Basic Samples and verify which permissions are used in the sample.

Next, I'd review any other libraries that you are including (ad providers? analytics providers?) to see if their libraries require phone permission.

Upvotes: 1

Related Questions