interface KusPushRegistrationProvider

This provider class is used to register/unregister device token in Core SDK.

Obtain an instance of KusPushRegistrationProvider like below:

Note: Before you begin, make sure you have initialized KustomerCore class with a valid API key. Also make sure,you have uploaded your FCM key in Kustomer Settings

val pushRegistrationProvider = KustomerCore.getInstance().kusPushNotificationProvider()

Once you have an instance of the provider, you can call methods on it and handle the KusResult object.

APIs with network or heavy data processing operations are currently marked with suspend modifier, and can be called from Kotlin Coroutines. If not using Kotlin Coroutines, then we are going to add KusCallback response support in the future




Name Summary
deregisterDeviceForPushNotifications [androidJvm]
abstract suspend fun deregisterDeviceForPushNotifications(): KusResult<Boolean>
Calls a push registration service to unregister a device from receiving push notifications.
registerDeviceToken [androidJvm]
abstract suspend fun registerDeviceToken(deviceToken: String?): KusResult<Boolean>
Registers with a push registration service to register the device token to receive push notifications. Stores the device token locally in SharedPreferences