Tobias Reich
Tobias Reich

Reputation: 5160

Android App: "play-services-gcm" requires "play-services-measurement"?

I just changed my Android project - which uses push notifications - to the latest gcm service (9.0.2) in my gradle settings and got the message to download the play-services-measurement to the same version.

Now I'm asking myself why this is necessary. I explicitly don't want any app measurements in my app nor do I want Google to do any on my behalf. I also don't have this in my dependencies so it surely comes from gcm.

Is this unavoidable? Does the com.google.android.gms:play-services-gcm always require these measurements? After all, I only want "notifications". Thanks for any clarification.

Upvotes: 2

Views: 128

Answers (1)

KENdi
KENdi

Reputation: 7741

I cannot find any resource about this, only the release notes from the Google APIs for Android, it's stated here that Application Measurement adds the measurement package, which contains features for collecting anonymous statistics on application events such as when a user first opens your application and on in-app purchase. While this data is not collected unless correctly configured.

If you want to opt-out of reporting to these statistics, you can add the following resource to your application.

<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="google_app_measurement_enable">0</integer>
</resources>

Also from this SO question, the WAKE_LOCK is being added by play-services-measurement dependency.

Upvotes: 0

Related Questions