Search in sources :

Example 6 with Tracker

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());
}
Also used : Tracker(com.google.android.gms.analytics.Tracker)

Example 7 with Tracker

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);
}
Also used : GoogleAnalytics(com.google.android.gms.analytics.GoogleAnalytics) Tracker(com.google.android.gms.analytics.Tracker)

Aggregations

Tracker (com.google.android.gms.analytics.Tracker)7 GoogleAnalytics (com.google.android.gms.analytics.GoogleAnalytics)3 HitBuilders (com.google.android.gms.analytics.HitBuilders)2 Intent (android.content.Intent)1 SharedPreferences (android.content.SharedPreferences)1 PowerManager (android.os.PowerManager)1 ViewPager (android.support.v4.view.ViewPager)1 CdcAcmSerialDriver (com.nightscout.android.drivers.USB.CdcAcmSerialDriver)1 AndroidPreferences (com.nightscout.android.preferences.AndroidPreferences)1 Uploader (com.nightscout.android.upload.Uploader)1 CRCFailError (com.nightscout.core.dexcom.CRCFailError)1 EGVRecord (com.nightscout.core.dexcom.records.EGVRecord)1 AbstractDevice (com.nightscout.core.drivers.AbstractDevice)1 AbstractUploaderDevice (com.nightscout.core.drivers.AbstractUploaderDevice)1 DexcomG4 (com.nightscout.core.drivers.DexcomG4)1 DownloadResults (com.nightscout.core.model.DownloadResults)1 G4Download (com.nightscout.core.model.G4Download)1 Provides (dagger.Provides)1 SlidingTabLayout (get.saga.ui.SlidingTabLayout)1 File (java.io.File)1