We have an existing app that we want to add Analytics to.
This link: https://developers.google.com/analytics/devguides/collection/android/devguide shows how to do so with a single Activity. It mentions that apps with multiple Activities should use the EasyTracker library. Although I couldn't find any direct documentation, looking through the samples and searching SO suggests that to use EasyTracker, Activities should extends TrackerActivity.
However, we're using the compatibility library for Fragment support, so most Activities in the App already extend FragmentActivity, and therefore cannot extend TrackerActivity.
Finding this post: Google Analytics in Android app - dealing with multiple activities, the answerer provides an alternative for this situation. When I start to implement the solution posted there, Eclipse gives a warning that the start
and stop
methods of GoogleAnalyticsTracker have been deprecated.
Unable to find documentation, I assume that start
has been replaced with startNewSession
, and stopSession
should be used instead of stop
, but am not sure. Will the solution linked above still work if I make those changes? Is there an alternative approach available for Apps with multiple Activities, that can't subclass TrackerActivity?
TYIA.