0

I know we can save email and password (Android/Google password manager/ auto fill service) if signing in the app and keyboard can suggest saved accounts

But if a user installs the app for the first time, how can we suggest an email from the system/Google account without password and without typing nothing at all?

For now I need to start typing some email before keyboard suggests the email

Update

Found the following example:

@Composable
fun AutofillEmail() {
  var email by remember { mutableStateOf("") }
  val autofillNode = AutofillNode(
    autofillTypes = listOf(AutofillType.EmailAddress),
    onFill = { email = it }
  )
  val autofill = LocalAutofill.current

  LocalAutofillTree.current += autofillNode

  OutlinedTextField(
    modifier = Modifier.onGloballyPositioned {
      autofillNode.boundingBox = it.boundsInWindow()
    }.onFocusChanged { focusState ->
      autofill?.run {
        if (focusState.isFocused) {
          requestAutofillForNode(autofillNode)
        } else {
          cancelAutofillForNode(autofillNode)
        }
      }
    },
    value = email,
    onValueChange = { email = it }
  )
}

but it only works for Google Autofill service:

enter image description here

enter image description here

On Samsung devices the default Autofill service is Samsung Pass

enter image description here

but nothing appears

Why Samsung doesn't suggest to autofill email of my Samsung account at least? My device is signed in to both Google and Samsung accounts...

enter image description here

user924
  • 8,146
  • 7
  • 57
  • 139

1 Answers1

0

You need at least one email registered in Samsung Pass to enable the autofill, check the logs.

Pablo Delgado
  • 41
  • 1
  • 9