Count unread notifications

TerraCore v0

Usage#

Get the number of unread notification.

coroutineScope.launch {
val deviceToken = callFunctionToGetFcmToken() // required for the non-login users
val result = TerraNotification.getInstance(terraApp).countUnreadNotifications(deviceToken)
if (result.isSuccess()) {
// update the UI or do something based on your business logic
} else {
// handle error if needed
val errorMessage = result.exception().message
}
}