Search in sources :

Example 16 with GoogleAnalytics

use of com.google.android.gms.analytics.GoogleAnalytics in project iosched by google.

the class AnalyticsHelper method setAnalyticsEnabled.

private static void setAnalyticsEnabled(boolean enabled) {
    LOGD(TAG, "Setting Analytics enabled: " + enabled);
    GoogleAnalytics instance = GoogleAnalytics.getInstance(sAppContext);
    if (instance != null) {
        instance.setAppOptOut(!enabled);
    }
    if (mFirebaseAnalytics != null) {
        mFirebaseAnalytics.setAnalyticsCollectionEnabled(enabled);
    }
}
Also used : GoogleAnalytics(com.google.android.gms.analytics.GoogleAnalytics)

Example 17 with GoogleAnalytics

use of com.google.android.gms.analytics.GoogleAnalytics 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

GoogleAnalytics (com.google.android.gms.analytics.GoogleAnalytics)17 Tracker (com.google.android.gms.analytics.Tracker)4 Provides (dagger.Provides)2 Map (java.util.Map)2 Singleton (javax.inject.Singleton)2 SharedPreferences (android.content.SharedPreferences)1 SystemUser (com.voipgrid.vialer.api.models.SystemUser)1 JsonStorage (com.voipgrid.vialer.util.JsonStorage)1