I use AutofillManager https://developer.android.com/reference/android/view/autofill/AutofillManager and can't understand how can I detect is user enter value himself or user select any autofill option.
I try to use editText.autofillValue
but it contains value both cases
Anyone knows how can I resolve it? Help me, please!)
P.S. code
I have function to request autofill
fun allowAutoFill(view: View?) {
if (view != null) {
val afm = requireContext().getSystemService(AutofillManager::class.java)
if (afm.isAutofillSupported && afm.isEnabled) {
afm?.requestAutofill(view)
}
}
}
After that i want to know user enter something or select value from autofill. It's needed for analytics.
private fun isAutoFillApplied() = binding?.editPassword?.autofillValue?.textValue?.isNotEmpty() == true
but binding?.editPassword?.autofillValue
contains value if user enter something and if user select autofill option