Skip to main content

using_sdk

Starting the SDK

To incorporate the SDK into your application, you must configure your custom capture application through a Builder component and submit it as a parameter via Intent Extra to DocumentRecognitionActivity.

  Intent intent = new Intent(context, DocumentRecognitionActivity.class);

VisualConfiguration visualConfiguration = new VisualConfiguration()
.setOnboardingDrawable(R.drawable.introscreen,500)
.setDocumentFrontDrawable(R.drawable.documentfront, 500)
.setDocumentBackDrawable(R.drawable.documentback, 500);

TextConfiguration textConfiguration = new TextConfiguration()
.setCustomText(TextConfiguration.CustomLabel.onboardingTitle, "Let's get started!")
.setCustomText(TextConfiguration.CustomLabel.onboardingFirstLabel, "- Go to a well-lit location")
.setCustomText(TextConfiguration.CustomLabel.onboardingSecondLabel, "- Remove the document from the plastic")
.setCustomText(TextConfiguration.CustomLabel.onboardingThirdLabel, "- Insert your document in the frame, waiting for it to turn green to perform the capture.");

DocumentRecognition mDocumentRecognition = new DocumentRecognition.Builder("YOUR_MOBILE_TOKEN_SENT_BY_QITECH")
.setDocumentSteps(DocumentSteps)
.setVisualConfiguration(visualConfiguration)
.setTextConfiguration(textConfiguration)
.showIntroductionScreens(true)
.setShowSuccessScreen(false)
.setBackgroundColor("#000000")
.setFontColor("#FFFFFF")
.setFontFamily(DocumentRecognition.FontFamily.open_sans)
.setSessionId("SESSION_ID")
.setLogLevel(FaceRecognition.LogLevel.debug)
.build();
intent.putExtra("settings", mDocumentRecognition);
startActivityForResult(intent, REQUEST_CODE);

We use a Mobile Token to allow authenticated access from your application to our API. It has probably already been sent to you by email. If you have not yet received your token, send an email to suporte.caas@qitech.com.br.

Our API expects to receive the Mobile Token in all requests to our server coming from the SDK, therefore, it must be included as a configuration parameter through the method mentioned above.

Attention

You must replace"YOUR_MOBILE_TOKEN_SENT_BY_QITECH" with the Mobile Token received from support.