Mindbox

Properties

Link copied to clipboard
val coroutineExceptionHandler: CoroutineExceptionHandler
Link copied to clipboard

Factory for custom initialisation of WorkManager

Functions

Link copied to clipboard

Removes deviceUuid subscription if it is no longer necessary

Link copied to clipboard
fun disposeFmsTokenSubscription(subscriptionId: String)

Removes push token subscription if it is no longer necessary

Link copied to clipboard

Removes push token subscription if it is no longer necessary

Link copied to clipboard
fun <T : OperationBody> executeAsyncOperation(context: Context, operationSystemName: String, operationBody: T)
fun <T : OperationBodyRequestBase> executeAsyncOperation(context: Context, operationSystemName: String, operationBody: T)
fun executeAsyncOperation(context: Context, operationSystemName: String, operationBodyJson: String)

Creates and deliveries event with specified name and body. Recommended call this method from background thread.

Link copied to clipboard
fun <T : OperationBodyRequestBase> executeSyncOperation(context: Context, operationSystemName: String, operationBody: T, onSuccess: (OperationResponse) -> Unit, onError: (MindboxError) -> Unit)
fun executeSyncOperation(context: Context, operationSystemName: String, operationBodyJson: String, onSuccess: (String) -> Unit, onError: (MindboxError) -> Unit)
fun <T : OperationBodyRequestBase, V : OperationResponseBase> executeSyncOperation(context: Context, operationSystemName: String, operationBody: T, classOfV: Class<V>, onSuccess: (V) -> Unit, onError: (MindboxError) -> Unit)

Creates and deliveries event synchronously with specified name and body.

Link copied to clipboard

Returns date of push token saving

Link copied to clipboard

Retrieves payload from intent generated by notification manager

Link copied to clipboard

Returns date of push token saving

Link copied to clipboard

Returns map of push tokens with providers and save dates

Link copied to clipboard

Returns SDK version

Link copied to clipboard

Retrieves url from intent generated by notification manager

Link copied to clipboard
fun handleRemoteMessage(context: Context, message: Any?, channelId: String, channelName: String, @DrawableRes pushSmallIcon: Int, defaultActivity: Class<out Activity>, channelDescription: String? = null, activities: Map<String, Class<out Activity>>? = null): Boolean

Handles only Mindbox notification message from HmsMessageService, FirebaseMessageService, RuStoreMessagingService.

Link copied to clipboard
fun init(activity: Activity, configuration: MindboxConfiguration, pushServices: List<MindboxPushService>)
fun init(application: Application, configuration: MindboxConfiguration, pushServices: List<MindboxPushService>)
fun init(context: Context, configuration: MindboxConfiguration, pushServices: List<MindboxPushService>)

Initializes the SDK for further work.

Link copied to clipboard

Method to initialise push services

Link copied to clipboard
open fun logD(message: String)
Link copied to clipboard
open fun logE(message: String, exception: Throwable? = null)
Link copied to clipboard
open fun logI(message: String)
Link copied to clipboard
open fun logW(message: String, exception: Throwable? = null)
Link copied to clipboard
fun onNewIntent(intent: Intent?)

Send track visit event after link or push was clicked for Activity with launchMode equals "singleTop" or "singleTask" or if a client used the Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_NEW_TASK flag when calling {@link #startActivity}.

Link copied to clipboard
fun onPushClicked(context: Context, intent: Intent): Boolean

Creates and deliveries event of "Push clicked". Recommended to be used with Mindbox SDK pushes with handleRemoteMessage method. Intent should contain "uniq_push_key" and "uniq_push_button_key" (optionally) in order to work correctly Recommended call this method from background thread.

fun onPushClicked(context: Context, uniqKey: String, buttonUniqKey: String?)

Creates and deliveries event of "Push clicked". Recommended call this method from background thread.

Link copied to clipboard
fun onPushReceived(context: Context, uniqKey: String)

Creates and deliveries event of "Push delivered". Recommended call this method from background thread.

Link copied to clipboard

Registers a callback for InApp messages.

Link copied to clipboard
fun setLogLevel(level: Level)

Specifies log level for Mindbox

Link copied to clipboard
fun setMessageHandling(imageFailureHandler: MindboxImageFailureHandler = PushNotificationManager.messageHandler.imageFailureHandler, imageLoader: MindboxImageLoader = PushNotificationManager.messageHandler.imageLoader)

Allows you to specify additional components for message handling when calling the handleRemoteMessage function.

Link copied to clipboard
fun subscribeDeviceUuid(subscription: (String) -> Unit): String

Subscribe to gets deviceUUID used by SDK

Link copied to clipboard
fun subscribeFmsToken(subscription: (String?) -> Unit): String

Subscribe to gets token from push service used by SDK

Link copied to clipboard
fun subscribePushToken(subscription: (String?) -> Unit): String

Subscribe to gets token from push service used by SDK

Link copied to clipboard
fun subscribePushTokens(subscription: (String?) -> Unit): String

Subscribe to gets tokens from push services used by SDK

Link copied to clipboard

Unregisters the current InApp message callback and restores the default SDK behavior.

Link copied to clipboard

This method is used to inform when the notification permission status changed to "allowed"

Link copied to clipboard
fun updatePushToken(context: Context, token: String)
fun updatePushToken(context: Context, token: String, pushService: MindboxPushService)

Updates push token for SDK Call it from onNewToken in messaging service

Link copied to clipboard
fun writeLog(message: String, logLevel: Level)

Writes a log message to the Mindbox logging system with the specified log level. This method should be used only after Mindbox has been initialized by calling Mindbox.init. Otherwise, the logs will not be recorded. This method takes a log message and a log level, and routes the message to the appropriate