android / input-samples

Multiple samples showing the best practices in input on Android.
Apache License 2.0
288 stars 265 forks source link

getWebDomain() function always returns null in Android AutoFill service #50

Closed avkorn closed 2 years ago

avkorn commented 2 years ago

Hi folks, I’m unable to get the domain name for the chrome webpage with which the autofill service sample is interacting. It works fine, but I need to know what is the webpage's domain name raised onFillRequest function.
I tested DebugService, and here I see the addAutofillableFields function with ViewNode parameter. It looks like node.getWebDomain() should return domain name from this page, but it always returns null. How can I get web domain in other ways? I tested login.yahoo.com page.

Thanks!

avkorn commented 2 years ago

Solved. web Domain name can be retrieved only from the one of the nodes from the node tree. I thought that it should be filled for each node.