use of com.google.firebase.analytics.FirebaseAnalytics in project mobile-center-sdk-android by Microsoft.
the class FirebaseUtils method setAnalyticsEnabled.
@SuppressWarnings("MissingPermission")
static void setAnalyticsEnabled(@NonNull Context context, boolean enabled) throws FirebaseUnavailableException {
try {
FirebaseAnalytics instance = FirebaseAnalytics.getInstance(context);
if (instance == null) {
throw new FirebaseUnavailableException("null instance");
}
instance.setAnalyticsCollectionEnabled(enabled);
} catch (NoClassDefFoundError | IllegalAccessError e) {
throw new FirebaseUnavailableException(e);
}
}
use of com.google.firebase.analytics.FirebaseAnalytics in project coins-android by bubelov.
the class UserRepository method onAuthorized.
private void onAuthorized() {
FirebaseAnalytics analytics = Injector.INSTANCE.mainComponent().analytics();
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.SIGN_UP_METHOD, getUserAuthMethod());
analytics.logEvent(FirebaseAnalytics.Event.SIGN_UP, bundle);
}
use of com.google.firebase.analytics.FirebaseAnalytics in project AppCenter-SDK-Android by Microsoft.
the class FirebaseUtils method setAnalyticsEnabled.
@SuppressWarnings("MissingPermission")
static void setAnalyticsEnabled(@NonNull Context context, boolean enabled) throws FirebaseUnavailableException {
try {
FirebaseAnalytics instance = FirebaseAnalytics.getInstance(context);
if (instance == null) {
throw new FirebaseUnavailableException("null instance");
}
instance.setAnalyticsCollectionEnabled(enabled);
} catch (NoClassDefFoundError | IllegalAccessError e) {
throw new FirebaseUnavailableException(e);
}
}
use of com.google.firebase.analytics.FirebaseAnalytics in project kcanotify by antest1.
the class KcaUtils method sendUserAnalytics.
public static void sendUserAnalytics(Context context, String event, JsonObject value) {
Bundle params = new Bundle();
FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(context);
if (value != null) {
for (String key : value.keySet()) {
params.putString(key, value.get(key).getAsString());
}
}
mFirebaseAnalytics.logEvent(event, params);
}
use of com.google.firebase.analytics.FirebaseAnalytics in project anitrend-app by AniTrend.
the class TagGenreService method initAnalytics.
public final void initAnalytics() {
FirebaseAnalytics analytics = FirebaseAnalytics.getInstance(getApplicationContext());
analytics.setAnalyticsCollectionEnabled(true);
analytics.setMinimumSessionDuration(KeyUtil.DURATION_LONG);
}
Aggregations