I am using the Google Analytics API for an android app. To make data requests we need to create a service object:
Analytics analytics = Analytics.builder(HTTP_TRANSPORT, JSON_FACTORY)
.setApplicationName("Hello-Analytics-API-Sample")
.setHttpRequestInitializer(credential)
.build();
What is the best way to pass this object to different activities, so I can data request for different activities? I checked the parcelable method, however, from what I understand, you need to implement that in the class whereas here I am importing the class from their API library.
Here is the article for more info: https://developers.google.com/analytics/solutions/articles/hello-analytics-api
To clarify I am using the GA API to pull data, not the SDK to collect data for my app.
Thanks