Class IncodeWelcome
-
- All Implemented Interfaces:
-
com.incode.welcome_sdk.IIncodeWelcome
public final class IncodeWelcome implements IIncodeWelcome
Provides the main methods to init IncodeWelcome.
Incode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
IncodeWelcome.Builder
Provides the methods to create and initialize a IncodeWelcome object. Capture Only SDK init requires only application parameter. External token SDK init (no apiKey SDK init) requires application and apiUrl parameter.
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 final class
IncodeWelcome.AddressFields
public final class
IncodeWelcome.OCRData
public enum
IncodeWelcome.IDResultsFetchMode
public interface
IncodeWelcome.VerifyListener
License verification listener
public class
IncodeWelcome.Companion
-
Field Summary
Fields Modifier and Type Field Description private final IncodeWelcomeRepositoryComponent
incodeWelcomeRepositoryComponent
private final DelayedOnboardingRepositoryComponent
delayedOnboardingRepositoryComponent
public final Boolean
isSubmitOnlyMode
public final Boolean
isCaptureOnlyMode
public final Boolean
isDelayedMode
public final Boolean
isExternalTokenUsed
public final Boolean
isRecording
public final static IncodeWelcome.Companion
Companion
-
Method Summary
Modifier and Type Method Description final IncodeWelcomeRepositoryComponent
getIncodeWelcomeRepositoryComponent()
final DelayedOnboardingRepositoryComponent
getDelayedOnboardingRepositoryComponent()
Unit
setCommonConfig(CommonConfig commonConfig)
SdkMode
getSdkMode()
Unit
setSdkMode(SdkMode sdkMode)
Sets the SdkMode Boolean
isTokenInitialized()
Unit
setStrings(Locale locale, Map<String, CharSequence> strings)
Unit
setStringArray(Locale locale, Map<String, Array<CharSequence>> stringArray)
Unit
setQuantityStrings(Locale locale, Map<String, Map<QuantityKeyword, CharSequence>> quantityStrings)
Unit
addFace(FaceInfo faceInfo)
Unit
removeFace(String customerUUID)
Unit
setFaces(List<FaceInfo> faceInfoList)
Unit
getFaces(FaceInfoListener faceInfoListener)
final Unit
initializeLazyObjectsIfNeeded()
final Unit
fetchFlowIndexes(IncodeWelcome.FetchFlowIndexesListener listener)
Unit
fetchAllFlows(String adminToken, IncodeWelcome.FetchFlowsListener fetchFlowsListener)
Unit
fetchFlow(String flowId, String token, IncodeWelcome.FetchFlowListener fetchFlowListener)
Unit
fetchRegions(FetchRegionsListener fetchRegionsListener)
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. 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. 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. Unit
syncDelayedOnboardings(SyncDelayedOnboardingListener syncDelayedOnboardingListener)
Unit
deleteAllDelayedOnboardings()
Unit
startWorkflow(Context context, SessionConfig sessionConfig, IncodeWelcome.OnboardingListener onboardingListener)
Unit
downloadLibraries()
Boolean
isLibrariesReady()
Check if core libraries are ready to be used. Unit
subscribeForLibrariesReady(FaceRecognitionPrepareListener faceRecognitionReadyListener)
Subscribe to get updates regarding libraries download. Unit
startQrFaceLogin(Context context, SelfieScan selfieScan, QrFaceLoginListener qrFaceLoginListener)
Unit
startFaceLogin(Context context, SelfieScan selfieScan, SelfieScanListener selfieScanListener)
Unit
setupOnboardingSession(SessionConfig sessionConfig, OnboardingSessionListener onboardingSessionListener)
Initiate new Onboarding session for section API. final Unit
startFlow(Context context, SessionConfig sessionConfig, IncodeWelcome.OnboardingListener onboardingListener)
Starts or resumes an onboarding session based on the provided session configuration. 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. final Unit
startFlowFromDeeplink(Context context, String deepLink, IncodeWelcome.OnboardingListener onboardingListener)
Resumes an onboarding session based on the provided deep link URL. 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. final DeviceFingerprint
getDeviceFingerprint()
Retrieves device fingerprint info. 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. Unit
faceMatch(String interviewId, IdCategory idCategory, FaceMatchListener faceMatchListener)
Executes a face match without a UI. Unit
processId(String interviewId, IdCategory idCategory, IdProcessListener idProcessListener)
Executes ID processing without a UI. Unit
processCustomWatchlist(String interviewId, ProcessCustomWatchlistListener processCustomWatchlistListener)
Executes custom watchlist processing without a UI. Unit
geolocation(Context context, String interviewId, GeolocationListener geolocationListener)
Executes geolocation module without a UI. Unit
processLaborHistory(String interviewId, String curp, ProcessLaborHistoryListener laborHistoryListener)
Executes process labor history without a UI. Unit
processPaymentProof(String interviewId, ProcessPaymentProofListener processPaymentProofListener)
Executes process payment proof without a UI. Unit
getPaymentProofInfo(String interviewId, PaymentProofInfoListener paymentProofInfoListener)
Retrieves payment proof info. Unit
addNOM151Archive(String interviewId, AddNOM151ArchiveListener addNOM151ArchiveListener)
Creates NOM 151 signed archive of the session. Unit
getUserOCRData(String token, GetUserOCRDataListener getUserOCRDataListener)
Retrieves OCR data for the user. 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. Unit
getReport(String interviewId, ReportListener reportListener)
Retrieves overall report of the executed flow (digital signature) Unit
processAntifraud(String interviewId, AntifraudListener antifraudListener)
Executes antifraud module without a UI. String
getInterviewId()
Get interview ID of the current session String
getVideoSelfiePath()
final Unit
deleteUserLocalData()
This method deletes all user local data collected during the onboarding from the device. final Unit
forceInterrupt(ForceInterruptListener forceInterruptListener)
This method interrupts any ongoing flow that might have started. final static IncodeWelcome
getInstance()
final static Boolean
setClientId(String clientId)
-
-
Method Detail
-
getIncodeWelcomeRepositoryComponent
final IncodeWelcomeRepositoryComponent getIncodeWelcomeRepositoryComponent()
-
getDelayedOnboardingRepositoryComponent
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP_PREFIX}) final DelayedOnboardingRepositoryComponent getDelayedOnboardingRepositoryComponent()
-
setCommonConfig
Unit setCommonConfig(CommonConfig commonConfig)
-
getSdkMode
SdkMode getSdkMode()
- Returns:
Selected SdkMode: SdkMode.STANDARD or SdkMode.CAPTURE_ONLY
-
setSdkMode
Unit setSdkMode(SdkMode sdkMode)
Sets the SdkMode
- Parameters:
sdkMode
- SdkMode.STANDARD or SdkMode.CAPTURE_ONLY
-
isTokenInitialized
Boolean isTokenInitialized()
-
setStrings
Unit setStrings(Locale locale, Map<String, CharSequence> strings)
-
setStringArray
Unit setStringArray(Locale locale, Map<String, Array<CharSequence>> stringArray)
-
setQuantityStrings
Unit setQuantityStrings(Locale locale, Map<String, Map<QuantityKeyword, CharSequence>> quantityStrings)
-
removeFace
Unit removeFace(String customerUUID)
-
getFaces
Unit getFaces(FaceInfoListener faceInfoListener)
-
initializeLazyObjectsIfNeeded
final Unit initializeLazyObjectsIfNeeded()
-
fetchFlowIndexes
final Unit fetchFlowIndexes(IncodeWelcome.FetchFlowIndexesListener listener)
-
fetchAllFlows
@Deprecated(message = "") Unit fetchAllFlows(String adminToken, IncodeWelcome.FetchFlowsListener fetchFlowsListener)
-
fetchFlow
@Deprecated(message = "") Unit fetchFlow(String flowId, String token, IncodeWelcome.FetchFlowListener fetchFlowListener)
-
fetchRegions
@Deprecated(message = "This method is deprecated as the region is no longer necessary in the onboarding flow.") Unit fetchRegions(FetchRegionsListener fetchRegionsListener)
-
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 contextsessionConfig
- Config for onboarding sessionflowConfig
- Config for onboarding flowonboardingListener
- 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 contextflowConfig
- Config for Welcome flowonboardingListener
- 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 contextflowConfig
- Config for Welcome flowonboardingListener
- Callback for success and error
-
syncDelayedOnboardings
Unit syncDelayedOnboardings(SyncDelayedOnboardingListener syncDelayedOnboardingListener)
-
deleteAllDelayedOnboardings
Unit deleteAllDelayedOnboardings()
-
startWorkflow
Unit startWorkflow(Context context, SessionConfig sessionConfig, IncodeWelcome.OnboardingListener onboardingListener)
-
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
-
subscribeForLibrariesReady
@Deprecated(message = "This method immediately calls {@link FaceRecognitionPrepareListener#onFaceRecognitionReady()}") Unit 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
Unit startQrFaceLogin(Context context, SelfieScan selfieScan, QrFaceLoginListener qrFaceLoginListener)
-
startFaceLogin
Unit startFaceLogin(Context context, SelfieScan selfieScan, SelfieScanListener selfieScanListener)
- Parameters:
context
- Activity's contextselfieScan
- SelfieScan module with LOGIN mode.selfieScanListener
- Callback for login results
-
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 configurationonboardingSessionListener
- 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
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
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
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
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 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.
-
getDeviceFingerprint
final DeviceFingerprint getDeviceFingerprint()
Retrieves device fingerprint info.
-
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 usingCONFERENCE
orRESULTS
modules, callfinishOnboarding()
first.If you are using IncodeWelcome.startOnboarding, this method is called automatically, and you do not have to do anything.
-
faceMatch
Unit faceMatch(String interviewId, IdCategory idCategory, FaceMatchListener faceMatchListener)
Executes a face match without a UI.
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of IncodeWelcome.setupOnboardingSession call.idCategory
- Identify the ID to be used during the face matching process IdCategory.FIRST or IdCategory.SECOND.faceMatchListener
- Callback for face match result
-
processId
Unit processId(String interviewId, IdCategory idCategory, IdProcessListener idProcessListener)
Executes ID processing without a UI.
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of IncodeWelcome.setupOnboardingSession call.idCategory
- Identify the ID to be used during the face matching process IdCategory.FIRST or IdCategory.SECOND.idProcessListener
- Callback for process ID result
-
processCustomWatchlist
Unit processCustomWatchlist(String interviewId, ProcessCustomWatchlistListener processCustomWatchlistListener)
Executes custom watchlist processing without a UI.
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of IncodeWelcome.setupOnboardingSession call.processCustomWatchlistListener
- Callback for custom watchlist result
-
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
-
processLaborHistory
Unit processLaborHistory(String interviewId, String curp, ProcessLaborHistoryListener laborHistoryListener)
Executes process labor history without a UI. Works for Mexico only
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of IncodeWelcome.setupOnboardingSession call.curp
- Mexican social security numberlaborHistoryListener
- Callback for process labor history result
-
processPaymentProof
Unit processPaymentProof(String interviewId, ProcessPaymentProofListener processPaymentProofListener)
Executes process payment proof without a 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 IncodeWelcome.getPaymentProofInfo
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of IncodeWelcome.setupOnboardingSession call.
-
getPaymentProofInfo
Unit getPaymentProofInfo(String interviewId, PaymentProofInfoListener paymentProofInfoListener)
Retrieves payment proof info.
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of IncodeWelcome.setupOnboardingSession call.
-
addNOM151Archive
Unit addNOM151Archive(String interviewId, AddNOM151ArchiveListener addNOM151ArchiveListener)
Creates NOM 151 signed archive of the session.
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of IncodeWelcome.setupOnboardingSession call.addNOM151ArchiveListener
- Callback for add NOM 151 archive result
-
getUserOCRData
Unit getUserOCRData(String token, 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
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 IDResultsFetchModeinterviewId
- ID that identifies current onboarding, returned as result of IncodeWelcome.setupOnboardingSession callgetUserScoreListener
- Callback for user score result
-
getReport
Unit getReport(String interviewId, ReportListener reportListener)
Retrieves overall report of the executed flow (digital signature)
- Parameters:
interviewId
- ID that identifies current onboarding, returned as result of IncodeWelcome.setupOnboardingSession callreportListener
- Callback for report result
-
processAntifraud
Unit processAntifraud(String interviewId, AntifraudListener antifraudListener)
Executes antifraud module without a UI.
- Parameters:
interviewId
- ID that identifies the current onboarding, returned as result of a IncodeWelcome.setupOnboardingSession call.antifraudListener
- Callback for antifraud result
-
getInterviewId
String getInterviewId()
Get interview ID of the current session
-
getVideoSelfiePath
String getVideoSelfiePath()
-
deleteUserLocalData
final Unit 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: OnboardingListener.onSuccess OnboardingListener.onUserCancelled
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
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.
-
getInstance
final static IncodeWelcome getInstance()
-
setClientId
final static Boolean setClientId(String clientId)
-
-
-
-