Creating the login interactor

It is time to create our login interaction, which will serve as the model that the login presenter will interact with. Create a LoginInteractor interface in the login package containing the following code:

package com.example.messenger.ui.loginimport com.example.messenger.data.local.AppPreferencesimport com.example.messenger.ui.auth.AuthInteractorinterface LoginInteractor : AuthInteractor {  interface OnDetailsRetrievalFinishedListener {    fun onDetailsRetrievalSuccess()    fun onDetailsRetrievalError()  }  fun login(username: String, password: String,       listener: AuthInteractor.onAuthFinishedListener)  fun retrieveDetails(preferences: AppPreferences,      listener: OnDetailsRetrievalFinishedListener)}

As you may have noticed, ...

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.