MoEngageFlutterAndroid class
The Android implementation of MoEngageFlutterPlatform.
- Inheritance
-
- Object
- PlatformInterface
- MoEngageFlutterAndroid
Constructors
Properties
Methods
-
deleteUser(
String appId) → Future< UserDeletionData> -
Delete User Data from MoEngage Server
appId- MoEngage App ID @returns - Instance of Future of typeUserDeletionData@since 1.1.0 -
getSelfHandledInApp(
String appId) → void -
Try to return a self handled in-app to the callback listener.
Ensure self handled in-app listener is set before you call this.
appId- MoEngage App ID -
initialise(
MoEInitConfig moEInitConfig, String appId) → void -
Initialize the MoEngage SDK
moEInitConfig- Instance ofMoEInitConfigappId- MoEngage App ID -
logout(
String appId) → void -
Invalidates the existing user and session. A new user
and session is created.
appId- MoEngage App ID - Navigates the user to the Notification settings
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onOrientationChanged(
) → void - To be called when Orientation of the App Is Changed
-
optOutDataTracking(
bool optOutDataTracking, String appId) → void -
Opt Out Data Tracking
appId- MoEngage App ID optOutDataTracking - Data Tracking OptOut State -
passPushPayload(
Map< String, dynamic> payload, MoEPushService pushService, String appId) → void -
Pass Push Payload to the MoEngage SDK.
appId- MoEngage App IDpayload- Push Payload DatapushService- Type ofMoEPushService -
passPushToken(
String pushToken, MoEPushService pushService, String appId) → void -
Pass Push Token To Native SDK
appId- MoEngage App IDpushService- Type ofMoEPushServicepushToken- Device Push Token -
permissionResponse(
bool isGranted, PermissionType type) → void -
Notify the SDK on notification permission granted to the application.
isGranted- Push Permission Granted Flagtype- Type ofPermissionType -
registerForPushNotification(
) → void -
Push Notification Registration
appId- MoEngage App ID -
requestPushPermission(
) → void - Requests the push notification permission
-
resetCurrentContext(
String appId) → void -
Reset Current Context for InApps
appId- MoEngage App ID -
selfHandledCallback(
Map< String, dynamic> payload) → void -
Self Handled InApp Action Callback
appId- MoEngage App IDpayload- SelfHandled InApp Payload of type Map -
setAlias(
String newUniqueId, String appId) → void -
Update user's unique id which was previously set by setUniqueId().
newUniqueId- New Unique Id of the userappId- MoEngage App ID -
setAppStatus(
MoEAppStatus appStatus, String appId) → void -
This API tells the SDK whether it is a fresh install or an existing application was updated.
appStatus- Instance ofMoEAppStatusappId- MoEngage App ID -
setBirthDate(
String birthDate, String appId) → void -
Set user's birth-date.
Birthdate should be sent in the following format - yyyy-MM-dd'T'HH:mm:ss.fff'Z'
birthDate- ISO Formatted Date StringappId- MoEngage App ID -
setCurrentContext(
List< String> contexts, String appId) → void -
Set the current context for the given user for InApps
appId- MoEngage App IDcontexts- List of Context -
setEmail(
String emailId, String appId) → void -
Tracks user's email-id as a user attribute.
emailId- Email Id of the UserappId- MoEngage App ID -
setFirstName(
String firstName, String appId) → void -
Tracks first name as a user attribute.
firstName- First Name of the UserappId- MoEngage App ID -
setGender(
MoEGender gender, String appId) → void -
Tracks gender as a user attribute.
gender- Instance ofMoEGenderappId- MoEngage App ID -
setLastName(
String lastName, String appId) → void -
Tracks last name as a user attribute.
lastName- Last Name of the UserappId- MoEngage App ID -
setLocation(
MoEGeoLocation location, String appId) → void -
Set's user's location
location- Instance ofMoEGeoLocationappId- MoEngage App ID -
setPhoneNumber(
String phoneNumber, String appId) → void -
Tracks phone number as a user attribute.
phoneNumber- Phone Number of the UserappId- MoEngage App ID -
setUniqueId(
String uniqueId, String appId) → void -
Set an Unique Identifier for the user
uniqueId- Unique User Id of type StringappId- MoEngage App ID -
setupNotificationChannel(
) → void - API to create notification channels on Android.
-
setUserAttribute(
String userAttributeName, dynamic userAttributeValue, String appId) → void -
Tracks a user attribute.
userAttributeValue- Data of typedynamicuserAttributeName- Name of User AttributeappId- MoEngage App ID -
setUserAttributeIsoDate(
String userAttributeName, String isoDateString, String appId) → void -
Tracks the given time as user-attribute.
Date should be passed in the following format - yyyy-MM-dd'T'HH:mm:ss.fff'Z'userAttributeName- Name of User AttributeisoDateString- ISO Formatted Date StringappId- MoEngage App ID -
setUserAttributeLocation(
String userAttributeName, MoEGeoLocation location, String appId) → void -
Tracks the given location as user attribute.
userAttributeName- Name of User Attributelocation- Instance ofMoEGeoLocationappId- MoEngage App ID -
setUserName(
String userName, String appId) → void -
Tracks user-name as a user attribute.
userName- User Name AttributeappId- Full Name value passed by user -
showInApp(
String appId) → void -
Try to show an InApp Message.
appId- MoEngage App ID -
toString(
) → String -
A string representation of this object.
inherited
-
trackEvent(
String eventName, MoEProperties eventAttributes, String appId) → void -
Track user behaviour as events with properties
eventName- Name of the Event to be trackedeventAttributes- Instance ofMoEPropertiesappId- MoEngage App ID -
updateDeviceIdentifierTrackingStatus(
String appId, String identifierType, bool state) → void -
Update Device tracking status for the identifier type
appId- MoEngage App IDidentifierType- Type of Identifierstate- Bool value for Enable/Disable State -
updatePushPermissionRequestCountAndroid(
int requestCount, String appId) → void -
Update Push Permission Request Count
requestCountThis count will be incremented to existing valueappId- MoEngage App ID -
updateSdkState(
bool shouldEnableSdk, String appId) → void -
Update SDK State
appId- MoEngage App IDshouldEnableSdk- SDK Enable State
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
registerWith(
) → void -
Registers this class as the default instance of
MoEngageFlutterPlatform