Skip to content

Commit

Permalink
fix: resolution and compress settings
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiankrein committed Oct 11, 2024
1 parent 514a24f commit 6efb7ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions caf-src/android/CombateAFraudeModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.ProgressBar;

import com.combateafraude.documentdetector.input.CaptureMode;
import com.combateafraude.documentdetector.input.CaptureStage;

import com.combateafraude.faceauthenticator.FaceAuthenticatorActivity;
import com.combateafraude.faceauthenticator.input.FaceAuthenticator;
import com.combateafraude.faceauthenticator.output.FaceAuthenticatorResult;
Expand All @@ -27,6 +22,7 @@
import com.combateafraude.documentdetector.input.Document;
import com.combateafraude.documentdetector.input.DocumentDetectorStep;
import com.combateafraude.documentdetector.DocumentDetectorActivity;
import com.combateafraude.documentdetector.input.Resolution;

public class CombateAFraudeModule extends ReactContextBaseJavaModule {

Expand Down Expand Up @@ -138,7 +134,6 @@ public String getName() {
return "CombateAFraude";
}

@ReactMethod
public void passiveFaceLiveness(String mobileToken) {
try {
PassiveFaceLiveness passiveFaceLiveness = new PassiveFaceLiveness.Builder(mobileToken)
Expand All @@ -153,7 +148,6 @@ public void passiveFaceLiveness(String mobileToken) {
}
}

@ReactMethod
public void documentDetector(String mobileToken, String documentType) {
try {
DocumentDetector.Builder documentDetectorBuilder = new DocumentDetector.Builder(mobileToken).setResolutionSettings(Resolution.ULTRA_HD).setCompressSettings(100);
Expand Down Expand Up @@ -188,7 +182,6 @@ public void documentDetector(String mobileToken, String documentType) {
}
}

@ReactMethod
public void faceAuthenticator(String mobileToken, String CPF) {
try {
FaceAuthenticator faceAuthenticator = new FaceAuthenticator.Builder(mobileToken)
Expand Down
2 changes: 1 addition & 1 deletion caf-src/ios/CombateAFraude.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class CombateAFraude: RCTEventEmitter, PassiveFaceLivenessControllerDelegate, Do

@objc(documentDetector:documentType:)
func documentDetector(mobileToken: String, documentType: String) {
let documentDetectorBuilder = DocumentDetectorSdk.CafBuilder(mobileToken: mobileToken)
let documentDetectorBuilder = DocumentDetectorSdk.CafBuilder(mobileToken: mobileToken).setResolutionSettings(resolution: CafResolution.ULTRA_HD).setCompressSettings(compressionQuality: 1.0)

_ = documentDetectorBuilder.enableMultiLanguage(false)

Expand Down

0 comments on commit 6efb7ba

Please sign in to comment.