-
- All Implemented Interfaces:
-
io.meiro.sdk.MeiroEvents
public class MeiroSdk implements MeiroEventsSingleton object for interacting with Meiro SDK. Before using the SDK, you must call init method. This should ideally happen in android.app.Application.onCreate method.
-
-
Method Summary
Modifier and Type Method Description Unitinit(Context context, Configuration configuration, MeiroLogger logger)Initialize the SDK UnitsetEnabled(Boolean enabled)Enable or disable the SDK UnittrackCustomEvent(Map<String, Object> properties)Track a custom event UnitresetIdentity()Reset the identity of the user UnittrackLinkClick(String url)Track click on a url UnittrackScreenView(String name, Map<String, Object> properties)Track a screen view with name and optional [properties UnitsetFcmToken(String token)Set the Firebase Cloud Messaging token MeiroAudiencegetAudience()Access to MeiroAudience API StringgetUserId()StringgetSessionId()-
-
Method Detail
-
init
Unit init(Context context, Configuration configuration, MeiroLogger logger)
Initialize the SDK
- Parameters:
context- application contextconfiguration- configuration of the SDKlogger- logger for the SDK
-
setEnabled
Unit setEnabled(Boolean enabled)
Enable or disable the SDK
-
trackCustomEvent
Unit trackCustomEvent(Map<String, Object> properties)
Track a custom event
-
resetIdentity
Unit resetIdentity()
Reset the identity of the user
-
trackLinkClick
Unit trackLinkClick(String url)
Track click on a url
-
trackScreenView
Unit trackScreenView(String name, Map<String, Object> properties)
Track a screen view with name and optional [properties
-
setFcmToken
Unit setFcmToken(String token)
Set the Firebase Cloud Messaging token
-
getAudience
MeiroAudience getAudience()
Access to MeiroAudience API
-
getSessionId
String getSessionId()
-
-
-
-