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 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.