Interface NativeFirebaseAnalytics
- All Superinterfaces:
NativeInterface
Native bridge for FirebaseAnalyticsProvider. Each platform
supplies an implementation that forwards to the native Firebase
Analytics SDK:
- Android:
FirebaseAnalytics.getInstance(context).logEvent(...)/setUserId/setUserProperty(requiresgoogle-services.jsonand the Firebase Gradle plugin in the build). - iOS:
FIRAnalytics logEventWithName:parameters:/setUserID:/setUserProperty:forName:(requiresGoogleService-Info.plistand the Firebase pods).
When no native peer is present (for example in the simulator, or in a
build without Firebase configured), NativeLookup.create
returns null / NativeInterface.isSupported() returns false and the
provider degrades to a no-op. Parameters are passed as a JSON object
string so the native side can map them to the SDK's bundle / NSDictionary.
-
Method Summary
Modifier and TypeMethodDescriptionvoidLogs a named event with a JSON object of parameters.voidLogs a screen view.voidSets the Firebase user id.voidsetUserProperty(String key, String value) Sets a Firebase user property.Methods inherited from interface NativeInterface
isSupported
-
Method Details
-
logEvent
-
logScreen
Logs a screen view.
Parameters
screenName: the screen name
-
setUserId
Sets the Firebase user id.
Parameters
id: the user id, or null to clear
-
setUserProperty
-