Sudo Email Notifiable Client
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
}