EasyTracker is a class designed to easy the burden of adding tracking code to your application.
Public class EasyTracker;
extends Object.
EasyTracker is a class designed to easy the burden of adding tracking code to your application. Simply add this class to your application and extend TrackedActivity instead of Activity for each Activity in your application.
This class is designed to be used from a single Thread. Use on the Main UI Thread is acceptable.
Note that all of your Activities must extend TrackedActivity (or an equivalent Activity, like TrackedListActivity instead of ListActivity) for this Class to properly track application usage and time. If you have an Activity Class that doesn't extend one provided in this package, you can create one by copying TrackedActivity and having it extend the Activity you want. For example, if you have an Activity subclass called FragmentActivity, simply create a class called TrackedFragmentActivity and have your classes extend that instead of FragmentActivity. The code for TrackedFragmentActivity should be the same as the code in TrackedActivity.
You can turn on tracking by providing a String resource of the name ga_api_key with a value of your account id (form UA-12345-6). You can provide various parameters as String, Bool or Integer resources (such as sampleRate) as well. Just use the proper type for the parameter (String for String, Bool for boolean and Integer for int).
If you want to track your Activities as well as the application, you can add the Bool resource ga_auto_activity_tracking and give it a value of "true".