Builder

open class Builder

Initialise MoEngage SDK using this class. Please follow the guidelines mentioned in MoEngage Integration Docs for integrating the MoEngage SDK.

Author

Umang Chamaria

Constructors

Builder
Link copied to clipboard
open fun Builder(@NonNull application: Application, @NonNull appId: String)
Builder to initialise MoEngage SDK.

Functions

build
Link copied to clipboard
open fun build(): MoEngage
Builds the configuration to initialise MoEngage SDK.
configureCards
Link copied to clipboard
open fun configureCards(@NonNull config: CardConfig): MoEngage.Builder
Configure Card feature.
configureDataSync
Link copied to clipboard
open fun configureDataSync(@NonNull config: DataSyncConfig): MoEngage.Builder
Optionally configure when the SDK sync collected data.
configureFcm
Link copied to clipboard
open fun configureFcm(@NonNull config: FcmConfig): MoEngage.Builder
Configure the Firebase Cloud Messaging.
configureGeofence
Link copied to clipboard
open fun configureGeofence(@NonNull config: GeofenceConfig): MoEngage.Builder
Configure Location
configureInApps
Link copied to clipboard
open fun configureInApps(@NonNull config: InAppConfig): MoEngage.Builder
Configure InApp
configureLogs
Link copied to clipboard
open fun configureLogs(@NonNull config: LogConfig): MoEngage.Builder
Configure logging done by MoEngage SDK
configureMiPush
Link copied to clipboard
open fun configureMiPush(@NonNull config: MiPushConfig): MoEngage.Builder
open fun configureMiPush(appId: String, appKey: String, enableTokenRegistration: Boolean): MoEngage.Builder
Configure Mi Push.
configureNotificationMetaData
Link copied to clipboard
open fun configureNotificationMetaData(@NonNull config: NotificationConfig): MoEngage.Builder
Configure Push Notification Meta Data
configurePushKit
Link copied to clipboard
open fun configurePushKit(@NonNull config: PushKitConfig): MoEngage.Builder
Configure Push Kit
configureRealTimeTrigger
Link copied to clipboard
open fun configureRealTimeTrigger(@NonNull config: RttConfig): MoEngage.Builder
Configure Real Time trigger.
configureTrackingOptOut
Link copied to clipboard
open fun configureTrackingOptOut(@NonNull config: TrackingOptOutConfig): MoEngage.Builder
Configure tracking opt-out.
enableEncryption
Link copied to clipboard
open fun enableEncryption(): MoEngage.Builder
By default the MoEngage SDK does not add additional encryption on top of https to REST API calls.
enableLogs
Link copied to clipboard
open fun enableLogs(level: Int): MoEngage.Builder
Enable SDK logs with the given level.
enableLogsForSignedBuild
Link copied to clipboard
open fun enableLogsForSignedBuild(): MoEngage.Builder
Enables/Disables MoEngage logs.
enableMultipleNotificationInDrawer
Link copied to clipboard
open fun enableMultipleNotificationInDrawer(): MoEngage.Builder
By default, the SDK shows only one notification at a given point in time, existing notification is updated with the new notification.
enablePartnerIntegration
Link copied to clipboard
open fun enablePartnerIntegration(@NonNull partner: IntegrationPartner): MoEngage.Builder
If you are using MoEngage bundled with any partner integration use this API to notify the partner.
enablePushKitTokenRegistration
Link copied to clipboard
open fun enablePushKitTokenRegistration(): MoEngage.Builder
By default the MoEngage SDK does not register for Huawei PushKit push token.
enableSegmentIntegration
Link copied to clipboard
open fun enableSegmentIntegration(): MoEngage.Builder
This API it to notify MoEngage SDK that the app uses MoEngage SDK along with Segment's SDK as a bundle.
optOutBackStackBuilder
Link copied to clipboard
open fun optOutBackStackBuilder(): MoEngage.Builder
By default MoEngage SDK synthesis the back-stack from the manifest when redirecting user on push click.
optOutInAppOnActivity
Link copied to clipboard
open fun optOutInAppOnActivity(inAppOptOutClassList: List<Class>): MoEngage.Builder
By default, the MoEngage SDK will try to show in-app messages on all the activities.
optOutNavBar
Link copied to clipboard
open fun optOutNavBar(): MoEngage.Builder
By default, the MoEngage SDK hides the top navigation bar when showing in-apps.
optOutNotificationLargeIcon
Link copied to clipboard
open fun optOutNotificationLargeIcon(): MoEngage.Builder
Optionally remove notification large icon
optOutTokenRegistration
Link copied to clipboard
open fun optOutTokenRegistration(): MoEngage.Builder
By default the MoEngage SDK registers for push token.
setDataCenter
Link copied to clipboard
open fun setDataCenter(@NonNull dataCenter: DataCenter): MoEngage.Builder
Optionally set the data-center to which the data should flow.
setNotificationColor
Link copied to clipboard
open fun setNotificationColor(@ColorRes color: Int): MoEngage.Builder
Set the color for notification.
setNotificationLargeIcon
Link copied to clipboard
open fun setNotificationLargeIcon(@DrawableRes largeIcon: Int): MoEngage.Builder
Set the large icon to be shown in the notification.
setNotificationSmallIcon
Link copied to clipboard
open fun setNotificationSmallIcon(@DrawableRes smallIcon: Int): MoEngage.Builder
Set the small icon to be shown in the notification.
setNotificationTone
Link copied to clipboard
open fun setNotificationTone(tone: String): MoEngage.Builder
Set the file name for notification tone.
setSenderId
Link copied to clipboard
open fun setSenderId(@NonNull senderId: String): MoEngage.Builder
Set the sender-id/project id for the FCM project.
setTokenRetryInterval
Link copied to clipboard
open fun setTokenRetryInterval(tokenRetryInterval: Long): MoEngage.Builder
Time interval after which SDK retry generating the push token in case of registration failure.