SudoEmailNotifiableClient

interface SudoEmailNotifiableClient : NotifiableClient

Interface encapsulating the NotifiableClient used to handle remove message notifications from the Sudo Platform Email Service.

Samples

import android.content.Context
import com.sudoplatform.sudoemail.BaseTests
import com.sudoplatform.sudoemail.SudoEmailClient
import com.sudoplatform.sudoemail.SudoEmailNotifiableClient
import com.sudoplatform.sudoemail.SudoEmailNotificationHandler
import com.sudoplatform.sudoemail.types.EmailMessageReceivedNotification
import com.sudoplatform.sudonotification.SudoNotificationClient
import com.sudoplatform.sudouser.SudoUserClient
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.kotlin.mock
import org.robolectric.RobolectricTestRunner

fun main() { 
   //sampleStart 
   val notificationHandler = object : SudoEmailNotificationHandler {
    override fun onEmailMessageReceived(message: EmailMessageReceivedNotification) {
        // Handle messageReceived notification
    }
}

val notifiableClient = SudoEmailNotifiableClient.builder()
    .setContext(context)
    .setNotificationHandler(notificationHandler)
    .build()

val sudoNotificationClient = SudoNotificationClient.builder()
    .setSudoUserClient(sudoUserClient)
    .setNotifiableClients(listOf(notifiableClient))
    .build() 
   //sampleEnd
}

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val serviceName: String

Functions

Link copied to clipboard
abstract fun getSchema(): NotificationMetaData
Link copied to clipboard
abstract fun processPayload(message: RemoteMessage)