I'm a little bit confused with the new Google Services and it's configuration files. With the latest version of the Google Play Services library we need to generate a JSON configuration file which provides service-specific information for our app and applying its gradle plugin it reads and loads that configuration file (see guide). Within that file we have something like this if we enable GCM and Analytics:
...
"services": {
"analytics_service": {
"status": 2,
"analytics_property": {
"tracking_id": "UA-XXXXXXXX-X"
}
},
"cloud_messaging_service": {
"status": 2,
"apns_config": []
}
...
I have two related questions:
Why do we need to put our
tracking_id
there if we already need it to instantiate our Analytics tracker? e.g:mTracker = GoogleAnalytics.getInstance(context).newTracker(R.xml.analytics_release);
Where
R.xml.analytics_release
contains again anotherga_trackingId
having two references toUA-XXXXXXXX-X
.In the GCM section what implies to have the
status
property activated (status: 2
) or deactivated (status: 1
)?
I don't really understand the need of this configuration file and its implications. Without it, we will get some warning messages and also having it we need to add some extra receivers in our manifest.