Class IncodeWelcome
-
- All Implemented Interfaces:
-
com.incode.welcome_sdk.IIncodeWelcome
public class IncodeWelcome implements IIncodeWelcome
Provides the main methods to init IncodeWelcome.
Incode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
IncodeWelcome.Builder
Provides the methods to create and initialize a IncodeWelcome object
public class
IncodeWelcome.OnboardingListener
public interface
IncodeWelcome.FetchFlowsListener
Interface for getting result of fetching flows
public interface
IncodeWelcome.FetchFlowIndexesListener
Interface for getting result of fetching flow indexes
public interface
IncodeWelcome.FetchFlowListener
Interface for getting result of fetching a flow
public enum
IncodeWelcome.DeleteUserError
Types of error when deleing a user
public class
IncodeWelcome.AddressFields
public class
IncodeWelcome.OCRData
public enum
IncodeWelcome.IDResultsFetchMode
public interface
IncodeWelcome.VerifyListener
License verification listener
-
Field Summary
Fields Modifier and Type Field Description public DelayedOnboardingRepositoryComponent
delayedOnboardingRepositoryComponent
public PublishSubject<TaxIdValidationResult>
taxIdValidationBus
public PublishSubject<Boolean>
delayedOnboardingIntroScreenBus
-
Method Summary
Modifier and Type Method Description DelayedOnboardingRepositoryComponent
getDelayedOnboardingRepositoryComponent()
static IncodeWelcome
getInstance()
Gets a IncodeWelcome instance static boolean
isInitialized()
void
setCommonConfig(@NonNull() CommonConfig commonConfig)
SdkMode
getSdkMode()
void
setSdkMode(SdkMode sdkMode)
Sets the SdkMode boolean
isTokenInitialized()
void
setStrings(@Nullable() Locale locale, @Nullable() Map<String, out CharSequence> strings)
void
setStringArray(@Nullable() Locale locale, @Nullable() Map<String, Array<CharSequence>> stringArray)
void
setQuantityStrings(@Nullable() Locale locale, @Nullable() Map<String, out Map<QuantityKeyword, out CharSequence>> quantityStrings)
void
addFace(@NonNull() FaceInfo faceInfo)
void
removeFace(@NonNull() String customerUUID)
void
setFaces(@NonNull() List<FaceInfo> faceInfoList)
void
getFaces(@NonNull() FaceInfoListener faceInfoListener)
void
initializeLazyObjectsIfNeeded()
static boolean
setClientId(String clientId)
void
fetchFlowIndexes(@Nullable() IncodeWelcome.FetchFlowIndexesListener listener)
void
fetchAllFlows(@NonNull() String adminToken, @Nullable() IncodeWelcome.FetchFlowsListener fetchFlowsListener)
void
fetchFlow(@Nullable() String flowId, @Nullable() String token, @Nullable() IncodeWelcome.FetchFlowListener fetchFlowListener)
void
fetchRegions(@Nullable() FetchRegionsListener fetchRegionsListener)
void
startOnboarding(@NonNull() Context context, @NonNull() SessionConfig sessionConfig, @NonNull() FlowConfig flowConfig, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Starts Incode Welcome Flow. void
startOnboardingSection(@NonNull() Context context, @NonNull() FlowConfig flowConfig, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Starts Incode Welcome Flow. void
startOnboardingSection(@NonNull() Context context, @Nullable() SessionConfig sessionConfig, @NonNull() FlowConfig flowConfig, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Starts Incode Welcome Flow. void
syncDelayedOnboardings(@NonNull() SyncDelayedOnboardingListener syncDelayedOnboardingListener)
void
deleteAllDelayedOnboardings()
void
startWorkflow(@NonNull() Context context, @NonNull() SessionConfig sessionConfig, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
void
downloadLibraries()
boolean
isLibrariesReady()
Check if core libraries are ready to be used. void
subscribeForLibrariesReady(FaceRecognitionPrepareListener faceRecognitionReadyListener)
Subscribe to get updates regarding libraries download. void
startQrFaceLogin(@NonNull() Context context, @NonNull() SelfieScan selfieScan, @NonNull() QrFaceLoginListener qrFaceLoginListener)
void
startFaceLogin(@NonNull() Context context, @NonNull() SelfieScan selfieScan, @NonNull() SelfieScanListener selfieScanListener)
void
setupOnboardingSession(@NonNull() SessionConfig sessionConfig, @Nullable() OnboardingSessionListener onboardingSessionListener)
Initiate new Onboarding session for section API. void
startFlow(@NonNull() Context context, @NonNull() SessionConfig sessionConfig, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Starts or resumes an onboarding session based on the provided session configuration. void
startFlow(@NonNull() Context context, @NonNull() SessionConfig sessionConfig, @NonNull() Modules startFromModule, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Starts or resumes an onboarding session based on the provided session configuration and starting module. void
startFlowFromDeeplink(@NonNull() Context context, @NonNull() String deepLink, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Resumes an onboarding session based on the provided deep link URL. void
startFlowFromDeeplink(@NonNull() Context context, @NonNull() String deepLink, @NonNull() SessionConfig sessionConfig, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Resumes an onboarding session based on the provided deep link URL and session configuration. void
finishOnboarding(@NonNull() Context context, @Nullable() FinishOnboardingListener finishOnboardingListener)
Important: This method needs to be called at the end of the flow, to close the session on server. void
faceMatch(@Nullable() String interviewId, @Nullable() IdCategory idCategory, @NonNull() FaceMatchListener faceMatchListener)
Executes a face match without an UI. void
processId(@Nullable() String interviewId, @Nullable() IdCategory idCategory, @NonNull() IdProcessListener idProcessListener)
Executes ID processing without an UI. void
processCustomWatchlist(@Nullable() String interviewId, @NonNull() ProcessCustomWatchlistListener processCustomWatchlistListener)
Executes custom watchlist processing without an UI. void
geolocation(@NonNull() Context context, @Nullable() String interviewId, @NonNull() GeolocationListener geolocationListener)
Executes geolocation module without an UI. void
processLaborHistory(@Nullable() String interviewId, @NonNull() String curp, @NonNull() ProcessLaborHistoryListener laborHistoryListener)
Executes process labor history without an UI. void
processPaymentProof(@Nullable() String interviewId, @NonNull() ProcessPaymentProofListener processPaymentProofListener)
Executes process payment proof without an UI. void
getPaymentProofInfo(@Nullable() String interviewId, @NonNull() PaymentProofInfoListener paymentProofInfoListener)
Retrieves payment proof info. void
addNOM151Archive(@Nullable() String interviewId, @NonNull() AddNOM151ArchiveListener addNOM151ArchiveListener)
Creates NOM 151 signed archive of the session. void
getUserOCRData(@Nullable() String token, @NonNull() GetUserOCRDataListener getUserOCRDataListener)
Retrieves OCR data for the user. void
getUserScore(@NonNull() IncodeWelcome.IDResultsFetchMode idResultsFetchMode, @Nullable() String interviewId, @NonNull() 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. void
getReport(@Nullable() String interviewId, @NonNull() ReportListener reportListener)
Retrieves overall report of the executed flow (digital signature) void
processAntifraud(@Nullable() String interviewId, @NonNull() AntifraudListener antifraudListener)
Executes antifraud module without a UI. String
getInterviewId()
Get interview ID of the current session String
getVideoSelfiePath()
void
deleteUserLocalData()
This method deletes all user local data collected during the onboarding from the device. void
forceInterrupt(ForceInterruptListener forceInterruptListener)
This method interrupts any ongoing flow that might have started. -
-
Method Detail
-
getDelayedOnboardingRepositoryComponent
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP_PREFIX) DelayedOnboardingRepositoryComponent getDelayedOnboardingRepositoryComponent()
-
getInstance
static IncodeWelcome getInstance()
Gets a IncodeWelcome instance
- Returns:
the IncodeWelcome instance
-
isInitialized
static boolean isInitialized()
-
setCommonConfig
void setCommonConfig(@NonNull() CommonConfig commonConfig)
-
getSdkMode
SdkMode getSdkMode()
- Returns:
Selected SdkMode: STANDARD or CAPTURE_ONLY
-
setSdkMode
void setSdkMode(SdkMode sdkMode)
Sets the SdkMode
- Parameters:
sdkMode
- STANDARD or CAPTURE_ONLY
-
isTokenInitialized
boolean isTokenInitialized()
-
setStrings
void setStrings(@Nullable() Locale locale, @Nullable() Map<String, out CharSequence> strings)
-
setStringArray
void setStringArray(@Nullable() Locale locale, @Nullable() Map<String, Array<CharSequence>> stringArray)
-
setQuantityStrings
void setQuantityStrings(@Nullable() Locale locale, @Nullable() Map<String, out Map<QuantityKeyword, out CharSequence>> quantityStrings)
-
removeFace
void removeFace(@NonNull() String customerUUID)
-
getFaces
void getFaces(@NonNull() FaceInfoListener faceInfoListener)
-
initializeLazyObjectsIfNeeded
void initializeLazyObjectsIfNeeded()
-
setClientId
static boolean setClientId(String clientId)
-
fetchFlowIndexes
void fetchFlowIndexes(@Nullable() IncodeWelcome.FetchFlowIndexesListener listener)
-
fetchAllFlows
@Deprecated() void fetchAllFlows(@NonNull() String adminToken, @Nullable() IncodeWelcome.FetchFlowsListener fetchFlowsListener)
-
fetchFlow
@Deprecated() void fetchFlow(@Nullable() String flowId, @Nullable() String token, @Nullable() IncodeWelcome.FetchFlowListener fetchFlowListener)
-
fetchRegions
void fetchRegions(@Nullable() FetchRegionsListener fetchRegionsListener)
-
startOnboarding
void startOnboarding(@NonNull() Context context, @NonNull() SessionConfig sessionConfig, @NonNull() FlowConfig flowConfig, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Starts Incode Welcome Flow. This is the main entry point to the SDK.
- Parameters:
context
- Activity's contextsessionConfig
- Config for onboarding sessionflowConfig
- Config for onboarding flowonboardingListener
- Callback for success and error
-
startOnboardingSection
void startOnboardingSection(@NonNull() Context context, @NonNull() FlowConfig flowConfig, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Starts Incode Welcome Flow. This is the main entry point to the SDK if you are using Split-flow functionality.
Important: You need to call 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 contextflowConfig
- Config for Welcome flowonboardingListener
- Callback for success and error
-
startOnboardingSection
void startOnboardingSection(@NonNull() Context context, @Nullable() SessionConfig sessionConfig, @NonNull() FlowConfig flowConfig, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Starts Incode Welcome Flow. This is the main entry point to the SDK if you are using Split-flow functionality.
Important: You need to call 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 contextflowConfig
- Config for Welcome flowonboardingListener
- Callback for success and error
-
syncDelayedOnboardings
void syncDelayedOnboardings(@NonNull() SyncDelayedOnboardingListener syncDelayedOnboardingListener)
-
deleteAllDelayedOnboardings
void deleteAllDelayedOnboardings()
-
startWorkflow
void startWorkflow(@NonNull() Context context, @NonNull() SessionConfig sessionConfig, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
-
downloadLibraries
@Deprecated() void downloadLibraries()
-
isLibrariesReady
@Deprecated() boolean isLibrariesReady()
Check if core libraries are ready to be used.
- Returns:
Always true
-
subscribeForLibrariesReady
@Deprecated() void subscribeForLibrariesReady(FaceRecognitionPrepareListener faceRecognitionReadyListener)
Subscribe to get updates regarding libraries download. This method also starts the download if it was not already started.
- Parameters:
faceRecognitionReadyListener
- FaceRecognitionPrepareListener
-
startQrFaceLogin
void startQrFaceLogin(@NonNull() Context context, @NonNull() SelfieScan selfieScan, @NonNull() QrFaceLoginListener qrFaceLoginListener)
-
startFaceLogin
void startFaceLogin(@NonNull() Context context, @NonNull() SelfieScan selfieScan, @NonNull() SelfieScanListener selfieScanListener)
- Parameters:
context
- Activity's contextselfieScan
- SelfieScan module with LOGIN mode.selfieScanListener
- Callback for login results
-
setupOnboardingSession
void setupOnboardingSession(@NonNull() SessionConfig sessionConfig, @Nullable() 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 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 finishOnboarding when the flow is complete, to close the session on server.
- Parameters:
sessionConfig
- session configurationonboardingSessionListener
- Callback for the result
-
startFlow
void startFlow(@NonNull() Context context, @NonNull() SessionConfig sessionConfig, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Starts or resumes an onboarding session based on the provided session configuration. If both
configurationId
andinterviewId
are specified in thesessionConfig
object, this method attempts to resume the existing onboarding session identified by theinterviewId
. If onlyconfigurationId
is specified in thesessionConfig
, a new onboarding session is started.- Parameters:
context
- The context of the Activity.sessionConfig
- The SessionConfig object containing the configuration settings and mandatoryconfigurationId
for the onboarding session.onboardingListener
- An OnboardingListener for receiving callbacks during the onboarding process.
-
startFlow
void startFlow(@NonNull() Context context, @NonNull() SessionConfig sessionConfig, @NonNull() Modules startFromModule, @NonNull() IncodeWelcome.OnboardingListener onboardingListener)
Starts or resumes an onboarding session based on the provided session configuration and starting module. If both
configurationId
andinterviewId
are specified in thesessionConfig
object, this method attempts to resume the existing onboarding session identified by theinterviewId
. If onlyconfigurationId
is specified in thesessionConfig
, a new onboarding session is started.- Parameters:
context
- The context of the Activity.sessionConfig
- The SessionConfig object containing the configuration settings and mandatoryconfigurationId
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
void startFlowFromDeeplink(@NonNull() Context context, @NonNull() String deepLink, @NonNull() 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
void startFlowFromDeeplink(@NonNull() Context context, @NonNull() String deepLink, @NonNull() SessionConfig sessionConfig, @NonNull() 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 theconfigurationId
andinterviewId
, 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
void finishOnboarding(@NonNull() Context context, @Nullable() 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 usingCONFERENCE
orRESULTS
modules, callfinishOnboarding()
first.If you are using startOnboarding, this method is called automatically, and you do not have to do anything.
-
faceMatch
void faceMatch(@Nullable() String interviewId, @Nullable() IdCategory idCategory, @NonNull() FaceMatchListener faceMatchListener)
Executes a face match without an UI.
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of setupOnboardingSession call.idCategory
- Identify the ID to be used during the face matching process FIRST or SECOND.faceMatchListener
- Callback for face match result
-
processId
void processId(@Nullable() String interviewId, @Nullable() IdCategory idCategory, @NonNull() IdProcessListener idProcessListener)
Executes ID processing without an UI.
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of setupOnboardingSession call.idCategory
- Identify the ID to be used during the face matching process FIRST or SECOND.idProcessListener
- Callback for process ID result
-
processCustomWatchlist
void processCustomWatchlist(@Nullable() String interviewId, @NonNull() ProcessCustomWatchlistListener processCustomWatchlistListener)
Executes custom watchlist processing without an UI.
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of setupOnboardingSession call.processCustomWatchlistListener
- Callback for custom watchlist result
-
geolocation
void geolocation(@NonNull() Context context, @Nullable() String interviewId, @NonNull() GeolocationListener geolocationListener)
Executes geolocation module without an UI. Caller is responsible for getting the android.permission.ACCESS_FINE_LOCATION prior to this call, onGeolocationUnavailable is called otherwise.
- Parameters:
context
- to use for fetching the geolocation.interviewId
- ID that identifies current onboarding, returned as result of setupOnboardingSession call.geolocationListener
- Callback for geolocation result
-
processLaborHistory
void processLaborHistory(@Nullable() String interviewId, @NonNull() String curp, @NonNull() ProcessLaborHistoryListener laborHistoryListener)
Executes process labor history without an UI. Works for Mexico only
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of setupOnboardingSession call.curp
- Mexican social security numberlaborHistoryListener
- Callback for process labor history result
-
processPaymentProof
void processPaymentProof(@Nullable() String interviewId, @NonNull() ProcessPaymentProofListener processPaymentProofListener)
Executes process payment proof without an UI. The callback is called immediately, when payment proof processing has been initiated successfully. The actual processing is done asynchronously on server, and usually takes around 20 seconds to complete. To get the results of Payment Proof processing, use getPaymentProofInfo
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of setupOnboardingSession call.
-
getPaymentProofInfo
void getPaymentProofInfo(@Nullable() String interviewId, @NonNull() PaymentProofInfoListener paymentProofInfoListener)
Retrieves payment proof info.
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of setupOnboardingSession call.
-
addNOM151Archive
void addNOM151Archive(@Nullable() String interviewId, @NonNull() AddNOM151ArchiveListener addNOM151ArchiveListener)
Creates NOM 151 signed archive of the session.
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of setupOnboardingSession call.addNOM151ArchiveListener
- Callback for add NOM 151 archive result
-
getUserOCRData
void getUserOCRData(@Nullable() String token, @NonNull() GetUserOCRDataListener getUserOCRDataListener)
Retrieves OCR data for the user.
- Parameters:
token
- Token belonging to a logged-in user, returned as result of 1:N login.
-
getUserScore
void getUserScore(@NonNull() IncodeWelcome.IDResultsFetchMode idResultsFetchMode, @Nullable() String interviewId, @NonNull() 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 IDResultsFetchModeinterviewId
- ID that identifies current onboarding, returned as result of setupOnboardingSession callgetUserScoreListener
- Callback for user score result
-
getReport
void getReport(@Nullable() String interviewId, @NonNull() ReportListener reportListener)
Retrieves overall report of the executed flow (digital signature)
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of setupOnboardingSession callreportListener
- Callback for report result
-
processAntifraud
void processAntifraud(@Nullable() String interviewId, @NonNull() AntifraudListener antifraudListener)
Executes antifraud module without a UI.
- Parameters:
interviewId
- ID that identifies the current onboarding, returned as result of a setupOnboardingSession call.antifraudListener
- Callback for antifraud result
-
getInterviewId
String getInterviewId()
Get interview ID of the current session
-
getVideoSelfiePath
String getVideoSelfiePath()
-
deleteUserLocalData
void deleteUserLocalData()
This method deletes all user local data collected during the onboarding from the device.
If you are using the default Onboarding flow, please make sure to call this method after user has completed all steps in the flow. It is safe to call this method after any of these callbacks has been called: onSuccessonErroronUserCancelled
If you are using the Advanced flow, where you're calling SDK modules individually, or grouping them in sections, and returning control to your host application in between. Please make sure not to call this method in between sections or modules, but only after the user completely finishes the custom flow. It is safe to call this method only after you call this one: finishOnboarding
-
forceInterrupt
void 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.
-
-
-
-