Здесь это пример кода
Код: Выделить всё
private suspend fun signUp(username: String, password: String): String {
return try {
//make api call to your backend and if success then
credentialManager.createCredential(
context = this,
request = CreatePasswordRequest(
id = username,
password = password
)
)
"Success"
} catch (e: CreateCredentialCancellationException) {
e.printStackTrace()
"Cancelled"
} catch(e: CreateCredentialException) {
e.printStackTrace()
Log.i("Erroris",e.toString())
"Failure"
}
}
Код: Выделить всё
Код: Выделить всё
android:importantForAutofill="no"
tools:ignore="Autofill,LabelFor"
Код: Выделить всё
val autofillManager = getSystemService(AutofillManager::class.java)
autofillManager?.disableAutofillServices()
Подробнее здесь: https://stackoverflow.com/questions/793 ... ng-save-pa