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 package:

package com.example.messenger.ui.chatimport 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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.