Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

HintConstants

public final class HintConstants
extends Object

java.lang.Object
   ↳ androidx.autofill.HintConstants


Contains all the officially supported autofill hint constants.

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_EMAIL_ADDRESS) or View.setAutofillHints(String[]).

Summary

Constants

String AUTOFILL_HINT_BIRTH_DATE_DAY

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

String AUTOFILL_HINT_BIRTH_DATE_FULL

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

String AUTOFILL_HINT_BIRTH_DATE_MONTH

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

String AUTOFILL_HINT_BIRTH_DATE_YEAR

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

String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE

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

String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY

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

String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH

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

String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR

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

String AUTOFILL_HINT_CREDIT_CARD_NUMBER

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

String AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE

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

String AUTOFILL_HINT_EMAIL_ADDRESS

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

String AUTOFILL_HINT_GENDER

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

String AUTOFILL_HINT_NAME

This constant is deprecated. replaced by .AUTOFILL_HINT_PERSON_NAME to be more specific

String AUTOFILL_HINT_NEW_PASSWORD

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

String AUTOFILL_HINT_NEW_USERNAME

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

String AUTOFILL_HINT_PASSWORD

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

String AUTOFILL_HINT_PERSON_NAME

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

String AUTOFILL_HINT_PERSON_NAME_FAMILY

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

String AUTOFILL_HINT_PERSON_NAME_GIVEN

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

String AUTOFILL_HINT_PERSON_NAME_MIDDLE

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

String AUTOFILL_HINT_PERSON_NAME_MIDDLE_INITIAL

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

String AUTOFILL_HINT_PERSON_NAME_PREFIX

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

String AUTOFILL_HINT_PERSON_NAME_SUFFIX

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

String AUTOFILL_HINT_PHONE

This constant is deprecated. replaced by .AUTOFILL_HINT_PHONE_NUMBER to be more specific

String AUTOFILL_HINT_PHONE_COUNTRY_CODE

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

String AUTOFILL_HINT_PHONE_NATIONAL

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

String AUTOFILL_HINT_PHONE_NUMBER

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

String AUTOFILL_HINT_PHONE_NUMBER_DEVICE

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

String AUTOFILL_HINT_POSTAL_ADDRESS

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

String AUTOFILL_HINT_POSTAL_ADDRESS_COUNTRY

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

String AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_ADDRESS

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

String AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_POSTAL_CODE

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

String AUTOFILL_HINT_POSTAL_ADDRESS_LOCALITY

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

String AUTOFILL_HINT_POSTAL_ADDRESS_REGION

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

String AUTOFILL_HINT_POSTAL_ADDRESS_STREET_ADDRESS

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

String AUTOFILL_HINT_POSTAL_CODE

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

String AUTOFILL_HINT_SMS_OTP

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

String AUTOFILL_HINT_USERNAME

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

Public methods

static 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).

Inherited methods

Constants

AUTOFILL_HINT_BIRTH_DATE_DAY

public static final String AUTOFILL_HINT_BIRTH_DATE_DAY

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_BIRTH_DATE_DAY).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "birthDateDay"

AUTOFILL_HINT_BIRTH_DATE_FULL

public static final String AUTOFILL_HINT_BIRTH_DATE_FULL

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .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 View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "birthDateFull"

AUTOFILL_HINT_BIRTH_DATE_MONTH

public static final String AUTOFILL_HINT_BIRTH_DATE_MONTH

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_BIRTH_DATE_MONTH).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "birthDateMonth"

AUTOFILL_HINT_BIRTH_DATE_YEAR

public static final String AUTOFILL_HINT_BIRTH_DATE_YEAR

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_BIRTH_DATE_YEAR).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "birthDateYear"

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE

public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE

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 View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .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. View.getAutofillType() to return View.AUTOFILL_TYPE_DATE.
  2. View.getAutofillValue() to return a date autofillvalue.
  3. View.autofill(android.view.autofill.AutofillValue) to expect a data autofillvalue.

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "creditCardExpirationDate"

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY

public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "creditCardExpirationDay"

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH

public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .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 Calendar.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 View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "creditCardExpirationMonth"

AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR

public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "creditCardExpirationYear"

AUTOFILL_HINT_CREDIT_CARD_NUMBER

public static final String AUTOFILL_HINT_CREDIT_CARD_NUMBER

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_CREDIT_CARD_NUMBER).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "creditCardNumber"

AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE

public static final String AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "creditCardSecurityCode"

AUTOFILL_HINT_EMAIL_ADDRESS

public static final String AUTOFILL_HINT_EMAIL_ADDRESS

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_EMAIL_ADDRESS).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "emailAddress"

AUTOFILL_HINT_GENDER

public static final String AUTOFILL_HINT_GENDER

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_GENDER).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "gender"

AUTOFILL_HINT_NAME

public static final String AUTOFILL_HINT_NAME

This constant is deprecated.
replaced by .AUTOFILL_HINT_PERSON_NAME to be more specific

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_NAME).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "name"

AUTOFILL_HINT_NEW_PASSWORD

public static final String AUTOFILL_HINT_NEW_PASSWORD

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_NEW_PASSWORD).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "newPassword"

AUTOFILL_HINT_NEW_USERNAME

public static final String AUTOFILL_HINT_NEW_USERNAME

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_NEW_USERNAME).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "newUsername"

AUTOFILL_HINT_PASSWORD

public static final String AUTOFILL_HINT_PASSWORD

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PASSWORD).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "password"

AUTOFILL_HINT_PERSON_NAME

public static final String AUTOFILL_HINT_PERSON_NAME

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PERSON_NAME).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "personName"

AUTOFILL_HINT_PERSON_NAME_FAMILY

public static final String AUTOFILL_HINT_PERSON_NAME_FAMILY

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PERSON_NAME_FAMILY).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "personFamilyName"

AUTOFILL_HINT_PERSON_NAME_GIVEN

public static final String AUTOFILL_HINT_PERSON_NAME_GIVEN

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PERSON_NAME_GIVEN).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "personGivenName"

AUTOFILL_HINT_PERSON_NAME_MIDDLE

public static final String AUTOFILL_HINT_PERSON_NAME_MIDDLE

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PERSON_NAME_MIDDLE).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "personMiddleName"

AUTOFILL_HINT_PERSON_NAME_MIDDLE_INITIAL

public static final String AUTOFILL_HINT_PERSON_NAME_MIDDLE_INITIAL

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PERSON_NAME_MIDDLE_INITIAL).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "personMiddleInitial"

AUTOFILL_HINT_PERSON_NAME_PREFIX

public static final String AUTOFILL_HINT_PERSON_NAME_PREFIX

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PERSON_NAME_PREFIX).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "personNamePrefix"

AUTOFILL_HINT_PERSON_NAME_SUFFIX

public static final String AUTOFILL_HINT_PERSON_NAME_SUFFIX

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PERSON_NAME_SUFFIX).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "personNameSuffix"

AUTOFILL_HINT_PHONE

public static final String AUTOFILL_HINT_PHONE

This constant is deprecated.
replaced by .AUTOFILL_HINT_PHONE_NUMBER to be more specific

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PHONE).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "phone"

AUTOFILL_HINT_PHONE_COUNTRY_CODE

public static final String AUTOFILL_HINT_PHONE_COUNTRY_CODE

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PHONE_COUNTRY_CODE).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "phoneCountryCode"

AUTOFILL_HINT_PHONE_NATIONAL

public static final String AUTOFILL_HINT_PHONE_NATIONAL

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PHONE_NATIONAL).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "phoneNational"

AUTOFILL_HINT_PHONE_NUMBER

public static final String AUTOFILL_HINT_PHONE_NUMBER

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 View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PHONE_NUMBER).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "phoneNumber"

AUTOFILL_HINT_PHONE_NUMBER_DEVICE

public static final String AUTOFILL_HINT_PHONE_NUMBER_DEVICE

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 View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_PHONE_NUMBER_DEVICE).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "phoneNumberDevice"

AUTOFILL_HINT_POSTAL_ADDRESS

public static final String AUTOFILL_HINT_POSTAL_ADDRESS

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_POSTAL_ADDRESS).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "postalAddress"

AUTOFILL_HINT_POSTAL_ADDRESS_COUNTRY

public static final String AUTOFILL_HINT_POSTAL_ADDRESS_COUNTRY

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_POSTAL_ADDRESS_COUNTRY).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "addressCountry"

AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_ADDRESS

public static final String AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_ADDRESS

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_ADDRESS).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "extendedAddress"

AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_POSTAL_CODE

public static final String AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_POSTAL_CODE

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 View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_POSTAL_CODE).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "extendedPostalCode"

AUTOFILL_HINT_POSTAL_ADDRESS_LOCALITY

public static final String AUTOFILL_HINT_POSTAL_ADDRESS_LOCALITY

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_POSTAL_ADDRESS_LOCALITY).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "addressLocality"

AUTOFILL_HINT_POSTAL_ADDRESS_REGION

public static final String AUTOFILL_HINT_POSTAL_ADDRESS_REGION

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_POSTAL_ADDRESS_REGION).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "addressRegion"

AUTOFILL_HINT_POSTAL_ADDRESS_STREET_ADDRESS

public static final String AUTOFILL_HINT_POSTAL_ADDRESS_STREET_ADDRESS

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_POSTAL_ADDRESS_STREET_ADDRESS).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "streetAddress"

AUTOFILL_HINT_POSTAL_CODE

public static final String AUTOFILL_HINT_POSTAL_CODE

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_POSTAL_CODE).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "postalCode"

AUTOFILL_HINT_SMS_OTP

public static final String AUTOFILL_HINT_SMS_OTP

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_SMS_OTP).

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

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "smsOTPCode"

AUTOFILL_HINT_USERNAME

public static final String AUTOFILL_HINT_USERNAME

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

Can be used with either View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be .AUTOFILL_HINT_USERNAME).

See View.setAutofillHints(String) for more info about autofill hints.

Constant Value: "username"

Public methods

generateSmsOtpHintForCharacterPosition

public static 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 View.setAutofillHints(String[]) or android:autofillHint (in which case the value should be smsOTPCode{characterPosition}).

See View.setAutofillHints(String) for more info about autofill hints.

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

Returns
String