AirshipHmsIntegration

Airship HMS integration.

Functions

Link copied to clipboard
fun isAirshipPush(message: RemoteMessage): Boolean

Checks if the push is from Airship or not.

Link copied to clipboard
fun processMessage(context: Context, message: RemoteMessage): Future<Void>

Called to handle com.huawei.hms.push.HmsMessageService.onMessageReceived The task should be finished before onMessageReceived(RemoteMessage message) is complete. Wait for the message to be complete by calling get() on the future. Don't call get() from the main thread: it blocks until the push is processed and can cause an ANR.

Link copied to clipboard
suspend fun processMessageSuspending(context: Context, message: RemoteMessage)

Called to handle com.huawei.hms.push.HmsMessageService.onMessageReceived from a coroutine. Suspends until the message is processed.

Link copied to clipboard
fun processMessageSync(context: Context, message: RemoteMessage)

Called to handle com.huawei.hms.push.HmsMessageService.onMessageReceived} synchronously.

Link copied to clipboard
fun processNewToken(context: Context, token: String?)

Called to handle new tokens.