Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Created September 26, 2018 23:11
Show Gist options
  • Save adrianhall/47177c9170f7d4bd1525a2a15a6cb5dd to your computer and use it in GitHub Desktop.
Save adrianhall/47177c9170f7d4bd1525a2a15a6cb5dd to your computer and use it in GitHub Desktop.
/**
* Save the current form data to the biometric store
*/
private fun saveToBiometricStore(password: String) {
if (whorlwind?.canStoreSecurely() == true) {
val disposable = Observable.just(password)
.observeOn(Schedulers.io())
.flatMapCompletable {value ->
whorlwind?.write("password", ByteString.encodeUtf8(value))
}
.subscribe()
mDisposable.add(disposable)
} else {
toast("Biometric storage is not available")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment