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.

        If you're using version 5.x.x of the Welcome SDK, 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.

        If you're using version 5.x.x of the Welcome SDK, 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.

        • If you're using version 5.x.x of the Welcome SDK, 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.<br></br> This is the main entry point to the SDK.

        Parameters:
        context - Activity's context
        sessionConfig - Config for onboarding session
        flowConfig - Config for onboarding flow
        onboardingListener - Callback for success and error
      • startOnboardingSection

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

        Starts Incode Welcome Flow.<br></br> This is the main entry point to the SDK if you are using Split-flow functionality.

        Important: You need to call IncodeWelcome.finishOnboarding when the flow is complete, to close the session on server.

        This is only necessary when using individual steps in the SDK or startOnboardingSection().

        Parameters:
        context - Activity's context
        flowConfig - Config for Welcome flow
        onboardingListener - Callback for success and error
      • startOnboardingSection

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

        Starts Incode Welcome Flow.<br></br> This is the main entry point to the SDK if you are using Split-flow functionality.

        Important: You need to call IncodeWelcome.finishOnboarding when the flow is complete, to close the session on server.

        This is only necessary when using individual steps in the SDK or startOnboardingSection().

        Parameters:
        context - Activity's context
        flowConfig - Config for Welcome flow
        onboardingListener - Callback for success and error
      • 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

      • 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 will be 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

         final 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.

        Parameters:
        context - The context of the Activity.
        sessionConfig - The SessionConfig object containing the configuration settings and mandatory configurationId for the onboarding session.
        onboardingListener - An OnboardingListener for receiving callbacks during the onboarding process.
      • startFlow

         final 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.

        Parameters:
        context - The context of the Activity.
        sessionConfig - The SessionConfig object containing the configuration settings and mandatory configurationId for the onboarding session.
        startFromModule - The starting module in the onboarding process for the resumed session.
        onboardingListener - An OnboardingListener for receiving callbacks during the onboarding process.
      • startFlowFromDeeplink

         final 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'.

        Parameters:
        context - The context of the Activity.
        deepLink - The deep link associated with the onboarding session.
        onboardingListener - An OnboardingListener for receiving callbacks during the onboarding process.
      • startFlowFromDeeplink

         final 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'.

        Parameters:
        context - The context of the Activity.
        deepLink - The deep link associated with the onboarding session.
        sessionConfig - The SessionConfig object containing the configuration settings for the onboarding session.
        onboardingListener - An OnboardingListener for receiving callbacks during the onboarding process.
      • 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 IncodeWelcome.startOnboarding, this method is called automatically, and you do not have to do anything.

      • 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 user completed all previous onboarding steps ie. ID scan, face scan etc. in order 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.