Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

How does Credit Card autofill actually work? #60

@misael-jonathan

Description

@misael-jonathan

Hi, I am currently trying to use credit card autofill in my Credit Cart Bill Payment page. In my case, I only need the credit card number. So in my first poc, I use a single field with autofillHints attr set with AUTOFILL_HINT_CREDIT_CARD_NUMBER. But the autofill recommendation on the keyboard didn't show at all.

After some checking, seems like a single field is not sufficient. I also need another view present in the layout, that is a view with autofillHints attr set with AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE or portions of the expiration date, and they have to be visible (width/height != 0, visibility == visible). Idk why, did some experiment and seems so.

But I don't need the expiration date at all. What I can do right now is by setting the height and width to 0,01dp, so the field doesn't appear to the users.

My question is, do I really need expire date field to be able to use the autofill feature? or can I achieve that with only a single field (creditCardNumber)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions