AndroidPromptModel

class AndroidPromptModel(val toHumanReadable: ConvertToHumanReadableFn = ::defaultConvertToHumanReadable) : ViewModel, PromptModel

PromptModel for Android platform.

On Android PromptModel is also a ViewModel. promptModelScope that it exposes is automatically cancelled when this ViewModel is cleared.

In addition to passphrasePromptModel, Android UI must provide bindings for two more dialog kinds: biometricPromptModel and scanNfcPromptModel.

Constructors

Link copied to clipboard
constructor(toHumanReadable: ConvertToHumanReadableFn = ::defaultConvertToHumanReadable)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val promptModelScope: CoroutineScope
Link copied to clipboard

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
open override fun <R> fold(initial: R, operation: (R, CoroutineContext.Element) -> R): R
Link copied to clipboard
open operator override fun <E : CoroutineContext.Element> get(key: CoroutineContext.Key<E>): E?
Link copied to clipboard
Link copied to clipboard
open override fun minusKey(key: CoroutineContext.Key<*>): CoroutineContext
Link copied to clipboard
open operator fun plus(context: CoroutineContext): CoroutineContext
Link copied to clipboard
suspend fun PromptModel.requestPassphrase(title: String, subtitle: String, passphraseConstraints: PassphraseConstraints, passphraseEvaluator: suspend (enteredPassphrase: String) -> PassphraseEvaluation?): String?

Requests that the UI layer should ask the user for a passphrase.

Link copied to clipboard
suspend fun showBiometricPrompt(cryptoObject: BiometricPrompt.CryptoObject?, title: String, subtitle: String, userAuthenticationTypes: Set<UserAuthenticationType>, requireConfirmation: Boolean): Boolean

Prompts user for authentication.