public interface FirebaseAnalyticsProvider.Bridge
The platform’s connection to the native Firebase SDK. The Codename One
build implements this for Android (direct SDK calls) and iOS (native
methods) and hands it to
registerBridge(Bridge). Application
code never implements this directly.Methods
public abstract boolean isSupported() | Whether the native Firebase SDK is present and initialised. |
public abstract void logEvent(String name, String paramsJson) | Logs a named event with a JSON object of parameters. |
public abstract void logScreen(String screenName) | Logs a screen view. |
public abstract void setUserId(String id) | Sets the Firebase user id. |
public abstract void setUserProperty(String key, String value) | Sets a Firebase user property. |
Method details
isSupported
public abstract boolean isSupported()Whether the native Firebase SDK is present and initialised.
Returns
true when events can be delivered
logEvent
public abstract void logEvent(String name, String paramsJson)Logs a named event with a JSON object of parameters.
Parameters
nameString- the event name
paramsJsonString- a JSON object of parameters, may be empty
logScreen
public abstract void logScreen(String screenName)Logs a screen view.
Parameters
screenNameString- the screen name
setUserId
public abstract void setUserId(String id)Sets the Firebase user id.
Parameters
idString- the user id, or null to clear
setUserProperty
public abstract void setUserProperty(String key, String value)Sets a Firebase user property.
Parameters
keyString- the property name
valueString- the property value