To have more customisation for upload functionality (submitDocument()), we offer RequestDocumentSend builder object.
Create instance of RequestDocumentSend with minimum setup:
Java
RequestDocumentSend request = new RequestDocumentSend();
// Set Credentials for Scanning
request.setCredentials("scanuser", "scanpassword").
request.setJourneyId("JourneyID");
// Set Document image.
request.setDocumentImage(DocumentImage);
Kotlin
val request = RequestDocumentSend()
// For first request
request.setJourneyId()
// To connect journeys reuse journeyID from ResponseUpload.journeyId()
request.setJourneyId(ResponseUpload.JourneyId)
// Set Document image.
request.setDocumentImage(bitmap)
Note: Using Enterprise Service builder you don’t need to specify credentials for each call, if specified it will override builder credentials.
If sending A4 Document you need to add:
Java
setSource(RequestDocumentSend.Source.A4_SCANNER)
If you are sending un-extracted images with background (like from gallery) use:
Java
setExtracted(RequestDocumentSend.Extracted.NO)
Will return processed images from IDscan Enterprise service.
Java
setReturnImages(RequestDocumentSend.ReturnImages.YES)
From “ResponseUpload” object assignee “journeyId”:
Java
// You can set Returned key from response or generate random UUID
.setJourneyId("JourneyID");
If your server is setup for Face Match and required action is “SELFIE”, “LIVENESS” (FaceMatch part) or Triple scan for selfie, you need to submit selfie image using the following:
Java
setSelfieImage(selfie);