Class FirebaseAnalyticsProvider

java.lang.Object
com.codename1.analytics.AbstractAnalyticsProvider
com.codename1.analytics.FirebaseAnalyticsProvider
All Implemented Interfaces:
AnalyticsProvider

public class FirebaseAnalyticsProvider extends AbstractAnalyticsProvider

A provider that forwards analytics to the native Firebase Analytics SDK through the NativeFirebaseAnalytics native interface. On Android and iOS, with Firebase configured in the build, events flow to the Firebase console. Where no native peer exists (the simulator, or a build without Firebase set up) the provider degrades silently to a no-op, so it is always safe to register.

Analytics.addProvider(new FirebaseAnalyticsProvider());

Firebase requires the usual platform configuration: google-services.json (Android) / GoogleService-Info.plist (iOS) plus the Firebase dependencies in the generated native project.