Creating the ChatInteractor and ChatPresenter

By now, we already understand what presenters and interactors are meant to do, so let's go straight to creating code. The following is the ChatInteractor interface. This and all other Chat_ files belong to the com.example.messenger.ui.chat package:

package com.example.messenger.ui.chatimport com.example.messenger.data.vo.ConversationVOinterface ChatInteractor {  interface OnMessageSendFinishedListener {    fun onSendSuccess()    fun onSendError()  }  interface onMessageLoadFinishedListener {    fun onLoadSuccess(conversationVO: ConversationVO)    fun onLoadError()  }  fun sendMessage(recipientId: Long, message: String, listener:   OnMessageSendFinishedListener)  fun loadMessages(conversationId: Long, listener:  ...

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.