use of com.google.android.gms.analytics.Tracker in project baker-android by bakerframework.
the class ABakerApp method sendTimingEvent.
@Override
public void sendTimingEvent(String category, long value, String name, String label) {
Tracker tracker = this.getTracker(TrackerName.GLOBAL_TRACKER);
Log.d(this.getClass().getName(), "Sending user timing event to Google Analytics with Category: " + category + ", Value: " + value + ", Name: " + name + ", Label: " + label);
// Build and send timing.
tracker.send(new HitBuilders.TimingBuilder().setCategory(category).setValue(value).setVariable(name).setLabel(label).build());
}
use of com.google.android.gms.analytics.Tracker in project saga-android by AnandChowdhary.
the class ApplicationWrapper method getTracker.
synchronized Tracker getTracker(TrackerName trackerId) {
if (!mTrackers.containsKey(trackerId)) {
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
Tracker t = (trackerId == TrackerName.APP_TRACKER) ? analytics.newTracker(PROPERTY_ID) : (trackerId == TrackerName.GLOBAL_TRACKER) ? analytics.newTracker(R.xml.global_tracker) : analytics.newTracker(R.xml.global_tracker);
mTrackers.put(trackerId, t);
}
return mTrackers.get(trackerId);
}
Aggregations