handleRemoteMessage

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.

Return

true if notification is Mindbox push and it's successfully handled, false otherwise.

Parameters

context

context used for Mindbox initializing and push notification showing

message

the MindboxRemoteMessage received from Firebase, HMS, RuStore

channelId

the id of channel for Mindbox pushes

channelName

the name of channel for Mindbox pushes

pushSmallIcon

icon for push notification as drawable resource

channelDescription

the description of channel for Mindbox pushes. Default is null

activities

map (url mask) -> (Activity class). When clicked on push or button with url, corresponding activity will be opened Currently supports '*' character - indicator of zero or more numerical, alphabetic and punctuation characters e.g. mask "https://sample.com/" will match only "https://sample.com/" link whereas mask "https://sample.com/\u002A" will match "https://sample.com/", "https://sample.com/foo", "https://sample.com/foo/bar", "https://sample.com/foo?bar=baz" and other masks

defaultActivity

default activity to be opened if url was not found in activities