Class CommonConfig.Builder
-
- All Implemented Interfaces:
public final class CommonConfig.Builder
-
-
Constructor Summary
Constructors Constructor Description CommonConfig.Builder()
-
Method Summary
Modifier and Type Method Description final CommonConfig.BuildersetRecognitionThreshold(Float recognitionThreshold)Set custom face recognition threshold final CommonConfig.BuildersetSpoofThreshold(Float spoofThreshold)Set custom spoof detection threshold final CommonConfig.BuildersetMaskThreshold(Float maskThreshold)Set custom mask detection threshold final CommonConfig.BuildersetIdGlareThreshold(Float idGlareThreshold)final CommonConfig.BuildersetIdBlurThreshold(Float idBlurThreshold)final CommonConfig.BuildersetShowCloseButton(Boolean showCloseButton)Sets whether the close button will be shown during the flow or not. final CommonConfig.BuildersetShowExitConfirmation(Boolean showExitConfirmation)final CommonConfig.BuildersetLocalizationLanguage(String localizationLanguage)Set the SDK language. final CommonConfig.BuildersetThemeConfiguration(ThemeConfiguration themeConfiguration)Sets ThemeConfiguration for modules that use traditional Android XML layouts. final CommonConfig.BuildersetThemeConfig(IncodeThemeConfig themeConfig)Sets IncodeThemeConfig used in modules designed using Compose, currently supported in following modules: ID V2
final CommonConfig.BuildersetUXConfig(IncodeUXConfig uxConfig)Applies V2 customizations and configurations for the UX. final CommonConfig.BuildersetUIConfigFromJson(Context context, String json)Configures the SDK theme and UX from a single JSON document. final CommonConfig.BuildersetShowDelayedOnboardingIntroScreen(Boolean showDelayedOnboardingIntroScreen)final CommonConfigbuild()final static CommonConfig.Builderfrom(CommonConfig existingConfig)-
-
Method Detail
-
setRecognitionThreshold
final CommonConfig.Builder setRecognitionThreshold(Float recognitionThreshold)
Set custom face recognition threshold
- Parameters:
recognitionThreshold- Threshold value, between 0 and 1- Returns:
-
setSpoofThreshold
final CommonConfig.Builder setSpoofThreshold(Float spoofThreshold)
Set custom spoof detection threshold
- Parameters:
spoofThreshold- Threshold value, between 0 and 1- Returns:
-
setMaskThreshold
@Deprecated(message = "Not used anymore") final CommonConfig.Builder setMaskThreshold(Float maskThreshold)
Set custom mask detection threshold
-
setIdGlareThreshold
final CommonConfig.Builder setIdGlareThreshold(Float idGlareThreshold)
- Parameters:
idGlareThreshold- Glare threshold value for ID Scan, values between 0 and 1.- Returns:
-
setIdBlurThreshold
final CommonConfig.Builder setIdBlurThreshold(Float idBlurThreshold)
- Parameters:
idBlurThreshold- Blurriness threshold value for ID Scan, values between 0 and 1.- Returns:
-
setShowCloseButton
final CommonConfig.Builder setShowCloseButton(Boolean showCloseButton)
Sets whether the close button will be shown during the flow or not.
-
setShowExitConfirmation
final CommonConfig.Builder setShowExitConfirmation(Boolean showExitConfirmation)
- Parameters:
showExitConfirmation- Shows (true) or hides (false) exit confirmation screen after the user presses the back button.- Returns:
-
setLocalizationLanguage
final CommonConfig.Builder setLocalizationLanguage(String localizationLanguage)
Set the SDK language.
After canceling the SDK flow, reset the application language and call the Activity.recreate() method in the com.incode.welcome_sdk.IncodeWelcome.OnboardingListener.onSuccess, com.incode.welcome_sdk.IncodeWelcome.OnboardingListener.onUserCancelled, and com.incode.welcome_sdk.IncodeWelcome.OnboardingListener.onError methods of com.incode.welcome_sdk.IncodeWelcome.OnboardingListener if the application language is different from the SDK language.
Make sure you have included 'extensions' dependency in the corresponding
build.gradlefile.
-
setThemeConfiguration
final CommonConfig.Builder setThemeConfiguration(ThemeConfiguration themeConfiguration)
Sets ThemeConfiguration for modules that use traditional Android XML layouts. The logo from ThemeConfiguration.Builder.setLogo also applies to UX V2 screens. The other styles apply to XML layouts only.
- Parameters:
themeConfiguration- Contains Theme and Styling customization- Returns:
-
setThemeConfig
final CommonConfig.Builder setThemeConfig(IncodeThemeConfig themeConfig)
Sets IncodeThemeConfig used in modules designed using Compose, currently supported in following modules:
ID V2
- Parameters:
themeConfig- IncodeThemeConfig that is used as theme source ornull.- Returns:
-
setUXConfig
final CommonConfig.Builder setUXConfig(IncodeUXConfig uxConfig)
Applies V2 customizations and configurations for the UX.
- Parameters:
uxConfig- IncodeUXConfig containing V2 UX customizations.- Returns:
-
setUIConfigFromJson
final CommonConfig.Builder setUIConfigFromJson(Context context, String json)
Configures the SDK theme and UX from a single JSON document. Replaces any theme and UX configuration set earlier on this builder, like every other setter. A missing or
nullthemeoruxsection sets that part to the SDK default. To combine a JSON theme with a programmatic UX config, call setUXConfig after this method.- Parameters:
context- Context used to resolve font resources referenced by the theme.json- JSON document withthemeanduxobjects.- Returns:
-
setShowDelayedOnboardingIntroScreen
final CommonConfig.Builder setShowDelayedOnboardingIntroScreen(Boolean showDelayedOnboardingIntroScreen)
- Parameters:
showDelayedOnboardingIntroScreen- Shows or hides the introduction screen when the SDK is started in Delayed mode.- Returns:
-
build
final CommonConfig build()
-
from
final static CommonConfig.Builder from(CommonConfig existingConfig)
-
-
-