MoEHelper
Interaction class for MoEngage SDK. Has helper methods to track events and user attributes.
Author
MoEngage (abhishek@moengage.com)
Functions
logoutUser
Link copied to clipboard
Invalidates the existing sessions and user attributes and treats all actions performed by the user as a new user after this method is called If the Application is doing a self registration for gcm token then invalidate the token on logout
registerActivityLifecycle
Link copied to clipboard
registerProcessLifecycleObserver
Link copied to clipboard
resetAppContext
Link copied to clipboard
Resets the current context of the user
setAlias
Link copied to clipboard
Update user's unique id which was previously set by setUniqueId
setAppStatus
Link copied to clipboard
This API tells the SDK whether it is a fresh install or an existing application was updated.
setBirthDate
Link copied to clipboard
Helper method to set User BirthDate
setFirstName
Link copied to clipboard
Helper method to set User first Name
setFullName
Link copied to clipboard
Helper method to set user full name
setGender
Link copied to clipboard
Helper method to set user gender
setLastName
Link copied to clipboard
Helper method to set User Last Name
setUniqueId
Link copied to clipboard
Helper method to set User Unique Id
setUserAttribute
Link copied to clipboard
open fun setUserAttribute(@NonNull attributeMap: Map<String, Any>): MoEHelper
Content copied to clipboard
Set the user attributes with the attributes specified in the HashMap
open fun setUserAttribute(@NonNull name: String, @NonNull location: Location): MoEHelper
Content copied to clipboard
open fun setUserAttribute(@NonNull name: String, @NonNull location: GeoLocation): MoEHelper
Content copied to clipboard
Content copied to clipboard
open fun setUserAttribute(@NonNull userAttribute: String, attributeValue: Boolean): MoEHelper
Content copied to clipboard
open fun setUserAttribute(@NonNull userAttribute: String, attributeValue: Double): MoEHelper
Content copied to clipboard
open fun setUserAttribute(@NonNull userAttribute: String, attributeValue: Float): MoEHelper
Content copied to clipboard
open fun setUserAttribute(@NonNull userAttribute: String, attributeValue: Int): MoEHelper
Content copied to clipboard
open fun setUserAttribute(@NonNull userAttribute: String, attributeValue: Long): MoEHelper
Content copied to clipboard
Set a user attribute for the current user
open fun setUserAttribute(@NonNull userAttribute: String, @NonNull attributeValue: String): MoEHelper
Content copied to clipboard
Set an user attribute.
open fun setUserAttribute(@NonNull name: String, @NonNull value: Date): MoEHelper
Content copied to clipboard
Set a date user attribute for the current user.
setUserAttributeEpochTime
Link copied to clipboard
open fun setUserAttributeEpochTime(@NonNull userAttribute: String, attributeValue: Long): MoEHelper
Content copied to clipboard
Sets the given epoch time for the given user.
setUserAttributeISODate
Link copied to clipboard
setUserLocation
Link copied to clipboard
To set user location, call this method
syncInteractionDataNow
Link copied to clipboard
Will request a data sync with MoEngage Platform.
trackDeviceLocale
Link copied to clipboard
Tracks device locale.
trackEvent
Link copied to clipboard
Content copied to clipboard
Use trackEvent
trackUserPushPreference
Link copied to clipboard
Set push preference for the user.
unregisterLifecycleCallbacks
Link copied to clipboard
Method to unregister lifecycle callbacks
unRegisterProcessLifecycleObserver
Link copied to clipboard