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);
}
}
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);
}
Aggregations