扩展: | Object |
应用安装包: | ui |
AccountKitConfiguration.AccountKitConfigurationBuilder(LoginType, ResponseType)
Creates an AccountKitConfigurationBuilder with the required parameters.
public AccountKitConfiguration.AccountKitConfigurationBuilder(LoginType loginType, ResponseType responseType)
参数 | 描述 |
---|---|
loginType | The type of login |
responseType | The response type expected at the end of the login operation |
setAdvancedUIManager(AdvancedUIManager)
Sets the Advanced UI Manager to be used for advanced customization of the UI.
public AccountKitConfigurationBuilder setAdvancedUIManager(AdvancedUIManager advancedUIManager)
参数 | 描述 |
---|---|
advancedUIManager | The advanced UI manager |
setDefaultCountryCode(String)
Sets the default country code, two letters to be used when in phone login mode.
public AccountKitConfigurationBuilder setDefaultCountryCode(String defaultCountryCode)
参数 | 描述 |
---|---|
defaultCountryCode | Two letter country code |
setFacebookNotificationsEnabled(boolean)
Sets up whether facebook notifications can be used as the fallback for sms confirmation. This option is true by default.
public AccountKitConfigurationBuilder setFacebookNotificationsEnabled(boolean facebookNotificationsEnabled)
参数 | 描述 |
---|---|
facebookNotificationsEnabled | Whether facebook notifications are enabled (true by default) |
setInitialAuthState(String)
Sets the initial auth state that will be passed with the login request. It will be returned as the final auth state at the end of the login operation.
public AccountKitConfigurationBuilder setInitialAuthState(String initialAuthState)
参数 | 描述 |
---|---|
initialAuthState | The initial auth state |
setInitialEmail(String)
If using the email login flow, sets the initial email for the login flow
public AccountKitConfigurationBuilder setInitialEmail(String initialEmail)
参数 | 描述 |
---|---|
initialEmail | The email to default to |
setInitialPhoneNumber(PhoneNumber)
If using the phone login flow, sets the initial phone number for the login flow
public AccountKitConfigurationBuilder setInitialPhoneNumber(PhoneNumber initialPhoneNumber)
参数 | 描述 |
---|---|
initialPhoneNumber | The initial phone number. |
setReadPhoneStateEnabled(boolean)
If the READ_PHONE_STATE permission is given and ths is true, when the phone number entry is displayed, the phone number of the device SIM will be entered. True by default.
public AccountKitConfigurationBuilder setReadPhoneStateEnabled(boolean readPhoneStateEnabled)
参数 | 描述 |
---|---|
readPhoneStateEnabled | If reading phone state is enabled (READ_PHONE_STATE permission must also be granted) |
setReceiveSMS(boolean)
If the RECEIVE_SMS permission is given and this is true, when the confirmation code is received in the SMS flow, we will automatically read in the code. True by default.
public AccountKitConfigurationBuilder setReceiveSMS(boolean receiveSMSEnabled)
参数 | 描述 |
---|---|
receiveSMSEnabled | If receiving SMS is enabled (RECEIVE_SMS permission must also be granted) |
setSMSBlacklist(String)
If using Phone Login, this sets the blacklist of country codes to be used for logging in. The order of operation is: 1) If no whitelist or blacklist, use all available country codes 2) If whitelist specified, use that as the base. Remove any blacklisted codes. 3) If only blacklist specified, use all available country codes and remove any blacklisted ones.
public AccountKitConfigurationBuilder setSMSBlacklist(String smsBlacklist)
参数 | 描述 |
---|---|
smsBlacklist | The blacklist of two letter country codes |
setSMSWhitelist(String)
If using Phone Login, this sets the whitelist of country codes to be used for logging in. The order of operation is: 1) If no whitelist or blacklist, use all available country codes 2) If whitelist specified, use that as the base. Remove any blacklisted codes. 3) If only blacklist specified, use all available country codes and remove any blacklisted ones.
public AccountKitConfigurationBuilder setSMSWhitelist(String smsWhitelist)
参数 | 描述 |
---|---|
smsWhitelist | The whitelist of two letter country codes |
setTheme(int)
Sets the resource id of the theme to use. This theme should extend from AccountKit.Theme.
public AccountKitConfigurationBuilder setTheme(int theme)
参数 | 描述 |
---|---|
theme | The theme resourceId |
setTitleType(TitleType)
Sets the type of title that is set in the header.
public AccountKitConfigurationBuilder setTitleType(TitleType titleType)
参数 | 描述 |
---|---|
titleType | The title type |
build()
Builders the configuration.
public AccountKitConfiguration build()