HintConstants


public final class HintConstants


Contains all the officially supported autofill hint constants.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_EMAIL_ADDRESS}) or setAutofillHints.

Summary

Constants

static final String
AUTOFILL_HINT_2FA_APP_OTP = "2faAppOTPCode"

Hint indicating that this view can be autofilled with an Time-Based One Time Password (OTP) generated by 2FA apps.

static final String

Hint indicating that this view can be autofilled with a birth day(of the month).

static final String

Hint indicating that this view can be autofilled with a full birth date.

static final String

Hint indicating that this view can be autofilled with a birth month.

static final String

Hint indicating that this view can be autofilled with a birth year.

static final String
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE = "creditCardExpirationDate"

Hint indicating that this view can be autofilled with a credit card expiration date.

static final String
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY = "creditCardExpirationDay"

Hint indicating that this view can be autofilled with a credit card expiration day.

static final String
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = "creditCardExpirationMonth"

Hint indicating that this view can be autofilled with a credit card expiration month.

static final String
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = "creditCardExpirationYear"

Hint indicating that this view can be autofilled with a credit card expiration year.

static final String

Hint indicating that this view can be autofilled with a credit card number.

static final String
AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE = "creditCardSecurityCode"

Hint indicating that this view can be autofilled with a credit card security code.

static final String

Hint indicating that this view can be autofilled with an email address.

static final String
AUTOFILL_HINT_EMAIL_OTP = "emailOTPCode"

Hint indicating that this view can be autofilled with an Email One Time Password (OTP).

static final String
AUTOFILL_HINT_FLIGHT_CONFIRMATION_CODE = "flightConfirmationCode"

Hint indicating that this view can be autofilled with a flight confirmation code.

static final String

Hint indicating that this view can be autofilled with a flight number.

static final String

Hint indicating that this view can be autofilled with a gender.

static final String

Hint indicating that this view can be autofilled with a gift card code.

static final String

Hint indicating that this view can be autofilled with a gift card pin.

static final String
AUTOFILL_HINT_LOYALTY_ACCOUNT_NUMBER = "loyaltyAccountNumber"

Hint indicating that this view can be autofilled with a loyalty number.

static final String

This field is deprecated.

replaced by {@value #AUTOFILL_HINT_PERSON_NAME} to be more specific

static final String

Hint indicating that this view can be interpreted as a newly created password for save/update.

static final String

Hint indicating that this view can be interpreted as a newly created username for save/update.

static final String

Hint indicating that this view is not eligible for autofill.

static final String

Hint indicating that this view can be autofilled with a password.

static final String

Hint indicating that this view can be autofilled with a person's full name.

static final String

Hint indicating that this view can be autofilled with a person's last/family name.

static final String

Hint indicating that this view can be autofilled with a person's first/given name.

static final String

Hint indicating that this view can be autofilled with a person's middle name.

static final String

Hint indicating that this view can be autofilled with a person's middle initial.

static final String

Hint indicating that this view can be autofilled with a person's name prefix.

static final String

Hint indicating that this view can be autofilled with a person's name suffix.

static final String

This field is deprecated.

replaced by {@value #AUTOFILL_HINT_PHONE_NUMBER} to be more specific

static final String

Hint indicating that this view can be autofilled with a phone number's country code.

static final String

Hint indicating that this view can be autofilled with a phone number without country code.

static final String

Hint indicating that this view can be autofilled with the user's full phone number with country code.

static final String
AUTOFILL_HINT_PHONE_NUMBER_DEVICE = "phoneNumberDevice"

Hint indicating that this view can be autofilled with the current device's phone number usually for Sign Up / OTP flows.

static final String

Hint indicating that this view can be autofilled with a postal address.

static final String

Hint indicating that this view can be autofilled with an apartment/room/suite number.

static final String

Hint indicating that this view can be autofilled with a country name/code.

static final String

Hint indicating that this view can be autofilled with a dependent locality i.e. district/locality division/postal division/suburb etc.

static final String

Hint indicating that this view can be autofilled with auxiliary address details.

static final String

Hint indicating that this view can be autofilled with an extended ZIP/POSTAL code.

static final String

Hint indicating that this view can be autofilled with an address locality (city/town).

static final String

Hint indicating that this view can be autofilled with a region/state.

static final String

Hint indicating that this view can be autofilled with a street address.

static final String

Hint indicating that this view can be autofilled with a postal code.

static final String

Hint indicating that this view can be autofilled with a promo/coupon code.

static final String
AUTOFILL_HINT_SMS_OTP = "smsOTPCode"

Hint indicating that this view can be autofilled with a SMS One Time Password (OTP).

static final String
AUTOFILL_HINT_UPI_VPA = "upiVirtualPaymentAddress"

Hint indicating that this view can be autofilled with an Unified Payments Interface (UPI) Virtual Payment Address.

static final String

Hint indicating that this view can be autofilled with a username.

static final String

Hint indicating that this view can be autofilled with a wifi password.

Public methods

static @NonNull String

Generates the corresponding hint that indicates that this view can be autofilled with the characterPosition'th character/digit of a SMS One Time Password (OTP).

Constants

AUTOFILL_HINT_2FA_APP_OTP

Added in 1.2.0
public static final String AUTOFILL_HINT_2FA_APP_OTP = "2faAppOTPCode"

Hint indicating that this view can be autofilled with an Time-Based One Time Password (OTP) generated by 2FA apps.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_2FA_APP_OTP}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_BIRTH_DATE_DAY

Added in 1.0.0
public static final String AUTOFILL_HINT_BIRTH_DATE_DAY = "birthDateDay"

Hint indicating that this view can be autofilled with a birth day(of the month).

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_BIRTH_DATE_DAY}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_BIRTH_DATE_FULL

Added in 1.0.0
public static final String AUTOFILL_HINT_BIRTH_DATE_FULL = "birthDateFull"

Hint indicating that this view can be autofilled with a full birth date.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_BIRTH_DATE_FULL}).

The recommended approach is to use a date autofill value - see AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE for more details.

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_BIRTH_DATE_MONTH

Added in 1.0.0
public static final String AUTOFILL_HINT_BIRTH_DATE_MONTH = "birthDateMonth"

Hint indicating that this view can be autofilled with a birth month.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_BIRTH_DATE_MONTH}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_BIRTH_DATE_YEAR

Added in 1.0.0
public static final String AUTOFILL_HINT_BIRTH_DATE_YEAR = "birthDateYear"

Hint indicating that this view can be autofilled with a birth year.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_BIRTH_DATE_YEAR}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE

Added in 1.0.0
public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE = "creditCardExpirationDate"

Hint indicating that this view can be autofilled with a credit card expiration date.

It should be used when the credit card expiration date is represented by just one view; if it is represented by more than one (for example, one view for the month and another view for the year), then each of these views should use the hint specific for the unit (AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, or AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR).

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE}).

When annotating a view with this hint, it's recommended to use a date autofill value to avoid ambiguity when the autofill service provides a value for it. To understand why a value can be ambiguous, consider "April of 2020", which could be represented as either of the following options:

  • "04/2020"
  • "4/2020"
  • "2020/04"
  • "2020/4"
  • "April/2020"
  • "Apr/2020"

You define a date autofill value for the view by overriding the following methods:

  1. getAutofillType to return AUTOFILL_TYPE_DATE.
  2. getAutofillValue to return a date autofillvalue.
  3. autofill to expect a data autofillvalue.

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY

Added in 1.0.0
public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY = "creditCardExpirationDay"

Hint indicating that this view can be autofilled with a credit card expiration day.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH

Added in 1.0.0
public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = "creditCardExpirationMonth"

Hint indicating that this view can be autofilled with a credit card expiration month.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH}).

When annotating a view with this hint, it's recommended to use a text autofill value whose value is the numerical representation of the month, starting on 1 to avoid ambiguity when the autofill service provides a value for it. To understand why a value can be ambiguous, consider "January", which could be represented as either of

  • "1": recommended way.
  • "0": if following the MONTH convention.
  • "January": full name, in English.
  • "jan": abbreviated name, in English.
  • "Janeiro": full name, in another language.

Another recommended approach is to use a date autofill value - see AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE for more details.

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR

Added in 1.0.0
public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = "creditCardExpirationYear"

Hint indicating that this view can be autofilled with a credit card expiration year.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_CREDIT_CARD_NUMBER

Added in 1.0.0
public static final String AUTOFILL_HINT_CREDIT_CARD_NUMBER = "creditCardNumber"

Hint indicating that this view can be autofilled with a credit card number.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_CREDIT_CARD_NUMBER}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE

Added in 1.0.0
public static final String AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE = "creditCardSecurityCode"

Hint indicating that this view can be autofilled with a credit card security code.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_EMAIL_ADDRESS

Added in 1.0.0
public static final String AUTOFILL_HINT_EMAIL_ADDRESS = "emailAddress"

Hint indicating that this view can be autofilled with an email address.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_EMAIL_ADDRESS}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_EMAIL_OTP

Added in 1.2.0
public static final String AUTOFILL_HINT_EMAIL_OTP = "emailOTPCode"

Hint indicating that this view can be autofilled with an Email One Time Password (OTP).

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_EMAIL_OTP}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_FLIGHT_CONFIRMATION_CODE

Added in 1.3.0-beta01
public static final String AUTOFILL_HINT_FLIGHT_CONFIRMATION_CODE = "flightConfirmationCode"

Hint indicating that this view can be autofilled with a flight confirmation code.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_FLIGHT_CONFIRMATION_CODE}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_FLIGHT_NUMBER

Added in 1.3.0-beta01
public static final String AUTOFILL_HINT_FLIGHT_NUMBER = "flightNumber"

Hint indicating that this view can be autofilled with a flight number. Examples: UA 355 (United Airlines), WN 355 (Southwest), AA 9158 (American Airlines)

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_FLIGHT_NUMBER}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_GENDER

Added in 1.0.0
public static final String AUTOFILL_HINT_GENDER = "gender"

Hint indicating that this view can be autofilled with a gender.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_GENDER}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_GIFT_CARD_NUMBER

Added in 1.3.0-beta01
public static final String AUTOFILL_HINT_GIFT_CARD_NUMBER = "giftCardNumber"

Hint indicating that this view can be autofilled with a gift card code.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_GIFT_CARD_NUMBER}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_GIFT_CARD_PIN

Added in 1.3.0-beta01
public static final String AUTOFILL_HINT_GIFT_CARD_PIN = "giftCardPIN"

Hint indicating that this view can be autofilled with a gift card pin.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_GIFT_CARD_PIN}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_LOYALTY_ACCOUNT_NUMBER

Added in 1.3.0-beta01
public static final String AUTOFILL_HINT_LOYALTY_ACCOUNT_NUMBER = "loyaltyAccountNumber"

Hint indicating that this view can be autofilled with a loyalty number.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_LOYALTY_ACCOUNT_NUMBER}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_NAME

Added in 1.0.0
Deprecated in 1.0.0
public static final String AUTOFILL_HINT_NAME = "name"

Hint indicating that this view can be autofilled with a user's real name.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_NAME}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_NEW_PASSWORD

Added in 1.0.0
public static final String AUTOFILL_HINT_NEW_PASSWORD = "newPassword"

Hint indicating that this view can be interpreted as a newly created password for save/update.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_NEW_PASSWORD}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_NEW_USERNAME

Added in 1.0.0
public static final String AUTOFILL_HINT_NEW_USERNAME = "newUsername"

Hint indicating that this view can be interpreted as a newly created username for save/update.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_NEW_USERNAME}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_NOT_APPLICABLE

Added in 1.2.0
public static final String AUTOFILL_HINT_NOT_APPLICABLE = "notApplicable"

Hint indicating that this view is not eligible for autofill.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_NOT_APPLICABLE}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PASSWORD

Added in 1.0.0
public static final String AUTOFILL_HINT_PASSWORD = "password"

Hint indicating that this view can be autofilled with a password.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PASSWORD}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PERSON_NAME

Added in 1.0.0
public static final String AUTOFILL_HINT_PERSON_NAME = "personName"

Hint indicating that this view can be autofilled with a person's full name.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PERSON_NAME}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PERSON_NAME_FAMILY

Added in 1.0.0
public static final String AUTOFILL_HINT_PERSON_NAME_FAMILY = "personFamilyName"

Hint indicating that this view can be autofilled with a person's last/family name.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PERSON_NAME_FAMILY}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PERSON_NAME_GIVEN

Added in 1.0.0
public static final String AUTOFILL_HINT_PERSON_NAME_GIVEN = "personGivenName"

Hint indicating that this view can be autofilled with a person's first/given name.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PERSON_NAME_GIVEN}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PERSON_NAME_MIDDLE

Added in 1.0.0
public static final String AUTOFILL_HINT_PERSON_NAME_MIDDLE = "personMiddleName"

Hint indicating that this view can be autofilled with a person's middle name.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PERSON_NAME_MIDDLE}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PERSON_NAME_MIDDLE_INITIAL

Added in 1.0.0
public static final String AUTOFILL_HINT_PERSON_NAME_MIDDLE_INITIAL = "personMiddleInitial"

Hint indicating that this view can be autofilled with a person's middle initial.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PERSON_NAME_MIDDLE_INITIAL}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PERSON_NAME_PREFIX

Added in 1.0.0
public static final String AUTOFILL_HINT_PERSON_NAME_PREFIX = "personNamePrefix"

Hint indicating that this view can be autofilled with a person's name prefix.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PERSON_NAME_PREFIX}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PERSON_NAME_SUFFIX

Added in 1.0.0
public static final String AUTOFILL_HINT_PERSON_NAME_SUFFIX = "personNameSuffix"

Hint indicating that this view can be autofilled with a person's name suffix.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PERSON_NAME_SUFFIX}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PHONE

Added in 1.0.0
Deprecated in 1.0.0
public static final String AUTOFILL_HINT_PHONE = "phone"

Hint indicating that this view can be autofilled with a phone number.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PHONE}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PHONE_COUNTRY_CODE

Added in 1.0.0
public static final String AUTOFILL_HINT_PHONE_COUNTRY_CODE = "phoneCountryCode"

Hint indicating that this view can be autofilled with a phone number's country code.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PHONE_COUNTRY_CODE}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PHONE_NATIONAL

Added in 1.0.0
public static final String AUTOFILL_HINT_PHONE_NATIONAL = "phoneNational"

Hint indicating that this view can be autofilled with a phone number without country code.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PHONE_NATIONAL}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PHONE_NUMBER

Added in 1.0.0
public static final String AUTOFILL_HINT_PHONE_NUMBER = "phoneNumber"

Hint indicating that this view can be autofilled with the user's full phone number with country code.

Example: +1 123-456-7890

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PHONE_NUMBER}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PHONE_NUMBER_DEVICE

Added in 1.0.0
public static final String AUTOFILL_HINT_PHONE_NUMBER_DEVICE = "phoneNumberDevice"

Hint indicating that this view can be autofilled with the current device's phone number usually for Sign Up / OTP flows.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PHONE_NUMBER_DEVICE}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_POSTAL_ADDRESS

Added in 1.0.0
public static final String AUTOFILL_HINT_POSTAL_ADDRESS = "postalAddress"

Hint indicating that this view can be autofilled with a postal address.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_POSTAL_ADDRESS}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_POSTAL_ADDRESS_APT_NUMBER

Added in 1.2.0
public static final String AUTOFILL_HINT_POSTAL_ADDRESS_APT_NUMBER = "aptNumber"

Hint indicating that this view can be autofilled with an apartment/room/suite number.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_POSTAL_ADDRESS_APT_NUMBER}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_POSTAL_ADDRESS_COUNTRY

Added in 1.0.0
public static final String AUTOFILL_HINT_POSTAL_ADDRESS_COUNTRY = "addressCountry"

Hint indicating that this view can be autofilled with a country name/code.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_POSTAL_ADDRESS_COUNTRY}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_POSTAL_ADDRESS_DEPENDENT_LOCALITY

Added in 1.2.0
public static final String AUTOFILL_HINT_POSTAL_ADDRESS_DEPENDENT_LOCALITY = "dependentLocality"

Hint indicating that this view can be autofilled with a dependent locality i.e. district/locality division/postal division/suburb etc.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_POSTAL_ADDRESS_DEPENDENT_LOCALITY}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_ADDRESS

Added in 1.0.0
public static final String AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_ADDRESS = "extendedAddress"

Hint indicating that this view can be autofilled with auxiliary address details.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_ADDRESS}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_POSTAL_CODE

Added in 1.0.0
public static final String AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_POSTAL_CODE = "extendedPostalCode"

Hint indicating that this view can be autofilled with an extended ZIP/POSTAL code.

Example: In forms that split the U.S. ZIP+4 Code with nine digits 99999-9999 into two fields annotate the delivery route code with this hint.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_POSTAL_CODE}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_POSTAL_ADDRESS_LOCALITY

Added in 1.0.0
public static final String AUTOFILL_HINT_POSTAL_ADDRESS_LOCALITY = "addressLocality"

Hint indicating that this view can be autofilled with an address locality (city/town).

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_POSTAL_ADDRESS_LOCALITY}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_POSTAL_ADDRESS_REGION

Added in 1.0.0
public static final String AUTOFILL_HINT_POSTAL_ADDRESS_REGION = "addressRegion"

Hint indicating that this view can be autofilled with a region/state.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_POSTAL_ADDRESS_REGION}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_POSTAL_ADDRESS_STREET_ADDRESS

Added in 1.0.0
public static final String AUTOFILL_HINT_POSTAL_ADDRESS_STREET_ADDRESS = "streetAddress"

Hint indicating that this view can be autofilled with a street address.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_POSTAL_ADDRESS_STREET_ADDRESS}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_POSTAL_CODE

Added in 1.0.0
public static final String AUTOFILL_HINT_POSTAL_CODE = "postalCode"

Hint indicating that this view can be autofilled with a postal code.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_POSTAL_CODE}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_PROMO_CODE

Added in 1.2.0
public static final String AUTOFILL_HINT_PROMO_CODE = "promoCode"

Hint indicating that this view can be autofilled with a promo/coupon code.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_PROMO_CODE}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_SMS_OTP

Added in 1.0.0
public static final String AUTOFILL_HINT_SMS_OTP = "smsOTPCode"

Hint indicating that this view can be autofilled with a SMS One Time Password (OTP).

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_SMS_OTP}).

When annotating OTP code fields which map to a single digit of the code consider using generateSmsOtpHintForCharacterPosition

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_UPI_VPA

Added in 1.2.0
public static final String AUTOFILL_HINT_UPI_VPA = "upiVirtualPaymentAddress"

Hint indicating that this view can be autofilled with an Unified Payments Interface (UPI) Virtual Payment Address.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_UPI_VPA}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_USERNAME

Added in 1.0.0
public static final String AUTOFILL_HINT_USERNAME = "username"

Hint indicating that this view can be autofilled with a username.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_USERNAME}).

See setAutofillHints for more info about autofill hints.

AUTOFILL_HINT_WIFI_PASSWORD

Added in 1.2.0
public static final String AUTOFILL_HINT_WIFI_PASSWORD = "wifiPassword"

Hint indicating that this view can be autofilled with a wifi password.

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be {@value #AUTOFILL_HINT_WIFI_PASSWORD}).

See setAutofillHints for more info about autofill hints.

Public methods

generateSmsOtpHintForCharacterPosition

Added in 1.0.0
public static @NonNull String generateSmsOtpHintForCharacterPosition(int characterPosition)

Generates the corresponding hint that indicates that this view can be autofilled with the characterPosition'th character/digit of a SMS One Time Password (OTP).

Can be used with either setAutofillHints or android:autofillHint (in which case the value should be smsOTPCode{characterPosition}).

See setAutofillHints for more info about autofill hints.

Parameters
int characterPosition

value between 1 and 8 representing the character position of the OTP code that the service should autofill in the associated view.