Class IncodeWelcome

  • All Implemented Interfaces:
    com.incode.welcome_sdk.IIncodeWelcome

    
    public final class IncodeWelcome
     implements IIncodeWelcome
                        

    Provides the main methods to init IncodeWelcome.

    Author:

    Incode

    • Constructor Detail

    • Method Detail

      • setStrings

         Unit setStrings(Locale locale, Map<String, CharSequence> strings)

        Add string resources to the Incode Welcome SDK which should be used instead of the ones from the strings.xml files. See the Dynamic Localization documentation for more info.

        Make sure you have included 'extensions' dependency in the corresponding build.gradle file.

        Parameters:
        locale - The locale that these new strings should be used in.
        strings - The mapping of string resource names to the new values those resources should represent
        Since:

        5.3.0

      • setStringArray

         Unit setStringArray(Locale locale, Map<String, Array<CharSequence>> stringArray)

        Add string array resources to the Incode Welcome SDK which should be used instead of the ones from the strings.xml files. See the Dynamic Localization documentation for more info.

        Note: Overriding a String array with one of a different length can result in unexpected behaviors/crashes.

        Make sure you have included 'extensions' dependency in the corresponding build.gradle file.

        Parameters:
        locale - The locale that these new strings should be used in.
        stringArray - The mapping of string array resource names to the new values those resources should represent
        Since:

        5.3.0

      • setQuantityStrings

         Unit setQuantityStrings(Locale locale, Map<String, Map<QuantityKeyword, CharSequence>> quantityStrings)

        Add quantity resources to the Incode Welcome SDK which should be used instead of the ones from the strings.xml files. See the Dynamic Localization documentation for more info.

        Notes:

        • As Quantity Strings use Plurals resources under the hood, the same rules apply as to when a quantity string is chosen for a given Locale. See the CLDR Language Plurals rules for more info.

        • Adding a quantity keyword for a value unused in the original Plurals resource can result in unexpected behaviors/crashes.

        • Make sure you have included extensions dependency in the corresponding build.gradle file.

        Parameters:
        locale - The locale that these new strings should be used in.
        quantityStrings - The mapping of quantity string resource names to the new values those resources should represent
        Since:

        5.3.0

      • addFace

        @Deprecated(message = "This method is deprecated and should no longer be used", replaceWith = @ReplaceWith(imports = {}, expression = "addFace(faceInfo, faceEventListener)")) Unit addFace(FaceInfo faceInfo)

        Adds a FaceInfo entry to the database.

      • addFace

         Unit addFace(FaceInfo faceInfo, FaceEventListener faceEventListener)

        Adds a FaceInfo entry to the database.

        Parameters:
        faceEventListener - Optional listener to listen for successful insertion or error handling.
      • removeFace

        @Deprecated(message = "This method is deprecated and should no longer be used.", replaceWith = @ReplaceWith(imports = {}, expression = "removeFace(customerUUID, faceEventListener)")) Unit removeFace(String customerUUID)

        Removes a FaceInfo entry from the database.

      • removeFace

         Unit removeFace(String customerUUID, FaceEventListener faceEventListener)

        Removes a FaceInfo entry from the database.

        Parameters:
        faceEventListener - Optional listener to listen for successful deletion or error handling.
      • removeAllFaces

         Unit removeAllFaces(FaceEventListener faceEventListener)

        Removes all FaceInfo entries from the database.

        Parameters:
        faceEventListener - Optional listener to listen for successful deletion or error handling.
      • setFaces

        @Deprecated(message = "This method is deprecated and should no longer be used.", replaceWith = @ReplaceWith(imports = {}, expression = "setFaces(faceInfoList, faceEventListener)")) Unit setFaces(List<FaceInfo> faceInfoList)

        Removes all FaceInfo entries from the database and inserts the provided list of FaceInfo entries.

      • setFaces

         Unit setFaces(List<FaceInfo> faceInfoList, FaceEventListener faceEventListener)

        Removes all FaceInfo entries from the database and inserts the provided list of FaceInfo entries.

        Parameters:
        faceEventListener - Optional listener to listen for successful insertion or error handling.
      • startOnboarding

         Unit startOnboarding(Context context, SessionConfig sessionConfig, FlowConfig flowConfig, IncodeWelcome.OnboardingListener onboardingListener)

        Starts Incode Welcome flow. This is the main entry point for onboarding driven by FlowConfig.

        Parameters:
        context - Activity context used to start module screens.
        sessionConfig - Session setup used to create or resume onboarding.
        flowConfig - Module sequence and module-level configuration to execute.
        onboardingListener - Callback for success, error, and cancellation.
        Since:

        1.0.0

      • startOnboardingSection

         Unit startOnboardingSection(Context context, FlowConfig flowConfig, IncodeWelcome.OnboardingListener onboardingListener)

        Starts split-flow onboarding from the first module in flowConfig. This is the main entry point when using split-flow functionality.

        Call finishOnboarding when split-flow execution is complete to close the session on the server.

        Parameters:
        context - Activity context used to start module screens.
        flowConfig - Module sequence and module-level configuration to execute.
        onboardingListener - Callback for success, error, and cancellation.
        Since:

        1.0.0

      • startOnboardingSection

         Unit startOnboardingSection(Context context, SessionConfig sessionConfig, FlowConfig flowConfig, IncodeWelcome.OnboardingListener onboardingListener)

        Starts split-flow onboarding with optional sessionConfig overrides. This is the main entry point when using split-flow functionality.

        Call finishOnboarding when split-flow execution is complete to close the session on the server.

        Parameters:
        context - Activity context used to start module screens.
        sessionConfig - Optional split-flow session overrides that are applied to internal configuration before modules start.
        flowConfig - Module sequence and module-level configuration to execute.
        onboardingListener - Callback for success, error, and cancellation.
      • startWorkflow

         Unit startWorkflow(Context context, SessionConfig sessionConfig, IncodeWelcome.OnboardingListener onboardingListener)

        Starts onboarding in workflow mode.

        Creates or resumes onboarding based on sessionConfig. If both configurationId and interviewId are provided, the existing session is resumed. If only configurationId is provided, a new session is created. A valid externalToken can also be used to initialize the session. If startup fails with com.incode.welcome_sdk.commons.exceptions.ModuleConfigurationException, onboardingListener receives it via OnboardingListener.onError.

        Parameters:
        context - Activity context used to start module screens.
        sessionConfig - Session setup used to create or resume onboarding.
        onboardingListener - Callback for success, error, and cancellation.
        Since:

        5.21.0

      • downloadLibraries

        @Deprecated(message = "This is now a no-op, because the libraries are bundled with the SDK. It will be removed in a future release.") Unit downloadLibraries()
      • isLibrariesReady

        @Deprecated(message = "This method always returns true") Boolean isLibrariesReady()

        Check if core libraries are ready to be used.

        Returns:

        Always true

      • startFaceLogin

         Unit startFaceLogin(Context context, SessionConfig sessionConfig, SelfieScan selfieScan, SelfieScanListener selfieScanListener)

        Starts the face login process. See the Face Login documentation for more details. Use this overload when you need to pass face login session settings such as E2EE. This overload was introduced later than the base startFaceLogin(context, selfieScan, selfieScanListener) API.

        Parameters:
        context - Activity context used to start module screens.
        sessionConfig - Session configuration that can enable E2EE for face login.
        selfieScan - SelfieScan module for login.
        selfieScanListener - Callback for login results.
        Since:

        Standard Releases: 5.45.0

        Patch Releases: 5.40.2

      • syncFaceLoginAttempts

         Unit syncFaceLoginAttempts(SyncFaceLoginAttemptsListener syncFaceLoginAttemptsListener)

        Synchronizes locally stored face authentication attempts with the server.

        Parameters:
        syncFaceLoginAttemptsListener - The callback listener for progress updates, success, and failure events.
      • setupOnboardingSession

         Unit setupOnboardingSession(SessionConfig sessionConfig, OnboardingSessionListener onboardingSessionListener)

        Initiate new Onboarding session for section API. This method has to be called before anything else. Do not use this API when using IncodeWelcome.startOnboarding because it will result in creating 2 sessions.

        Also call this method if you want to resume some existing onboarding session with an interviewId, externalId or external token. Selfie and ID images are fetched for this session as well, so this method may take a while to complete.

        Make sure to call IncodeWelcome.finishOnboarding when the flow is complete, to close the session on server.

        Parameters:
        sessionConfig - session configuration
        onboardingSessionListener - Callback for the result
      • startFlow

         Unit startFlow(Context context, SessionConfig sessionConfig, IncodeWelcome.OnboardingListener onboardingListener)

        Starts or resumes an onboarding session based on the provided session configuration. If both configurationId and interviewId are specified in the sessionConfig object, this method attempts to resume the existing onboarding session identified by the interviewId. If only configurationId is specified in the sessionConfig, a new onboarding session is started. A valid externalToken can also be used to initialize the session.

        Parameters:
        context - Activity context used to start module screens.
        sessionConfig - Session setup used to create or resume onboarding.
        onboardingListener - Callback for success, error, and cancellation.
        Since:

        5.24.0

      • startFlow

         Unit startFlow(Context context, SessionConfig sessionConfig, Modules startFromModule, IncodeWelcome.OnboardingListener onboardingListener)

        Starts or resumes an onboarding session based on the provided session configuration and starting module. If both configurationId and interviewId are specified in the sessionConfig object, this method attempts to resume the existing onboarding session identified by the interviewId. If only configurationId is specified in the sessionConfig, a new onboarding session is started. A valid externalToken can also be used to initialize the session.

        Parameters:
        context - Activity context used to start module screens.
        sessionConfig - Session setup used to create or resume onboarding.
        startFromModule - Starting module for resumed sessions.
        onboardingListener - Callback for success, error, and cancellation.
        Since:

        5.24.0

      • startFlowFromDeeplink

         Unit startFlowFromDeeplink(Context context, String deepLink, IncodeWelcome.OnboardingListener onboardingListener)

        Resumes an onboarding session based on the provided deep link URL. The deep link is used to extract the session configuration settings, including the interview ID, configuration ID, and starting module. Example of a deep link URL: https://example.com/clientid/flow/abc123?utm_source=finish&interviewId=xyz456&module=ID In this example, the configuration ID is 'abc123', the interview ID is 'xyz456', and the starting module is 'ID'. If the module name from the deep link cannot be resolved, onboardingListener receives an IncodeGenericError.

        Parameters:
        context - Activity context used to start module screens.
        deepLink - Deep link associated with the onboarding session.
        onboardingListener - Callback for success, error, and cancellation.
        Since:

        5.24.0

      • startFlowFromDeeplink

         Unit startFlowFromDeeplink(Context context, String deepLink, SessionConfig sessionConfig, IncodeWelcome.OnboardingListener onboardingListener)

        Resumes an onboarding session based on the provided deep link URL and session configuration. The deep link is used to extract the session configuration settings, including the interview ID, configuration ID, and starting module. If the sessionConfig parameter contains the configurationId and interviewId, the values extracted from the deep link will override the corresponding values in the session configuration. Example of a deep link URL: https://example.com/clientid/flow/abc123?utm_source=finish&interviewId=xyz456&module=ID In this example, the configuration ID is 'abc123', the interview ID is 'xyz456', and the starting module is 'ID'. If the module name from the deep link cannot be resolved, onboardingListener receives an IncodeGenericError.

        Parameters:
        context - Activity context used to start module screens.
        deepLink - Deep link associated with the onboarding session.
        sessionConfig - Session configuration merged with deep-link values.
        onboardingListener - Callback for success, error, and cancellation.
        Since:

        5.24.0

      • finishOnboarding

         Unit finishOnboarding(Context context, FinishOnboardingListener finishOnboardingListener)

        Important: This method needs to be called at the end of the flow, to close the session on server.

        If you are using individual steps in the SDK or startOnboardingSection(), you need to call this method when you're done. If you are using CONFERENCE or RESULTS modules, call finishOnboarding() first.

        If you are using startOnboarding, this method is called automatically, and you do not have to do anything.

        Parameters:
        context - Activity context.
        finishOnboardingListener - Callback for completion (onOnboardingFinished()), error, and cancellation.
        Since:

        1.0.0

      • geolocation

         Unit geolocation(Context context, String interviewId, GeolocationListener geolocationListener)

        Executes geolocation module without a UI. Caller is responsible for getting the android.permission.ACCESS_FINE_LOCATION prior to this call, GeolocationListener.onGeolocationUnavailable is called otherwise.

        Parameters:
        context - to use for fetching the geolocation.
        interviewId - ID that identifies current onboarding, returned as result of IncodeWelcome.setupOnboardingSession call.
        geolocationListener - Callback for geolocation result
      • getUserScore

         Unit getUserScore(IncodeWelcome.IDResultsFetchMode idResultsFetchMode, String interviewId, GetUserScoreListener getUserScoreListener)

        Retrieves Onboarding user score - includes Overall Score, ID verification results, Liveness check and Facial recognition results Please make sure to call this API after the user has completed all previous onboarding steps (e.g. ID scan, face scan, etc.) to get all available results. It may take around 20 seconds for this API to return the result.

        Parameters:
        idResultsFetchMode - Mode for fetching results IDResultsFetchMode
        interviewId - ID that identifies current onboarding, returned as result of IncodeWelcome.setupOnboardingSession call
        getUserScoreListener - Callback for user score result
      • forceInterrupt

         final Unit forceInterrupt(ForceInterruptListener forceInterruptListener)

        This method interrupts any ongoing flow that might have started. It closes all open SDK activities and interrupts all active processes.

        Note: This is a forceful interruption, it should not be used unless there is no other recommended SDK method available to achieve the same behavior (e.g. sections API) Using this method may lead to unpredictable behavior or potentially lose user data. Always consider using other SDK methods before resorting to this one.