Creating the signup interactor

Now we will implement a signup interactor to act as a model that our yet-to-be-implemented signup presenter will communicate with. Create a SignUpInteractor interface within the signup package, as follows:

package com.example.messenger.ui.signupimport com.example.messenger.ui.auth.AuthInteractorinterface SignUpInteractor : AuthInteractor {  interface OnSignUpFinishedListener {    fun onSuccess()    fun onUsernameError()    fun onPasswordError()    fun onPhoneNumberError()    fun onError()  }  fun signUp(username: String, phoneNumber: String, password: String,              listener: OnSignUpFinishedListener)  fun getAuthorization(listener: AuthInteractor.onAuthFinishedListener)}

You may have noticed that SignUpInteractor extends AuthInteractor ...

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.