SmsRepository

interface SmsRepository

Types

Link copied to clipboard
class ReceivedErrorException(val errorCode: Int) : Exception

Returned when sms sending error is returned from OS.

Link copied to clipboard

Returned when not received successful response message

Link copied to clipboard
class SmsSendingState(val sent: Int, val total: Int)

Shows the current status of sending task.

Functions

Link copied to clipboard
abstract fun generateSmsParts(value: String): Single<List<String>>
Link copied to clipboard
abstract fun isAwaitedSuccessMessage(sender: String, message: String, requiredSender: String, submissionId: Int, submissionType: SubmissionType): Single<Boolean>

Check if a message is the expected one or not

Link copied to clipboard
abstract fun listenToConfirmationSms(fromDate: Date, waitingTimeoutSeconds: Int, requiredSender: String, submissionId: Int, submissionType: SubmissionType): Completable

Starts process of listening to result confirmation sms

Link copied to clipboard
abstract fun sendSms(number: String, smsParts: List<String>, sendingTimeoutSeconds: Int): Observable<SmsRepository.SmsSendingState>

Sends given text by sms