44 lines
1.9 KiB
Java
44 lines
1.9 KiB
Java
|
package io.beid.beidk;
|
||
|
|
||
|
import android.app.Activity;
|
||
|
import android.content.Intent;
|
||
|
import androidx.core.app.ActivityCompat;
|
||
|
import io.beid.beidk.BEIDConfigurationFactory;
|
||
|
import io.beid.beidk.activity.ScanPassportActivity;
|
||
|
import io.beid.beidk.definitions.SCBHeader;
|
||
|
import java.util.Map;
|
||
|
import java.util.UUID;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class PassportManager {
|
||
|
public static final int EXIT_FAIL = 2;
|
||
|
public static final int EXIT_UPLOAD_THROW_EXCEPTION = 1;
|
||
|
public static final String KEY_PASSPORT_DATA = "passportData";
|
||
|
public static final String KEY_PASSPORT_EXCEPTION_MESSAGE = "scanPassportErrorMessage";
|
||
|
public static final String KEY_PASSPORT_EXIT_CODE = "scanPassportStatusCode";
|
||
|
public static final int SCAN_PASSPORT_OK = 0;
|
||
|
|
||
|
public static void startPassportScanner(Activity activity, int i, Map<String, String> map, BEIDConfigurationFactory bEIDConfigurationFactory) {
|
||
|
Intent intent = new Intent(activity, (Class<?>) ScanPassportActivity.class);
|
||
|
intent.putExtra(SCBHeader.SCB_REQ_HEADER_REQUEST_ID, UUID.randomUUID().toString());
|
||
|
for (String str : map.keySet()) {
|
||
|
intent.putExtra(str, map.get(str));
|
||
|
}
|
||
|
intent.putExtra("_config", bEIDConfigurationFactory);
|
||
|
ActivityCompat.lQ_(activity, intent, i, null);
|
||
|
}
|
||
|
|
||
|
public static void startPassportScanner(Activity activity, int i, Map<String, String> map, BEIDConfigurationFactory.Builder builder) {
|
||
|
startPassportScanner(activity, i, map, builder.Build());
|
||
|
}
|
||
|
|
||
|
public static void startPassportScanner(Activity activity, int i, Map<String, String> map) {
|
||
|
Intent intent = new Intent(activity, (Class<?>) ScanPassportActivity.class);
|
||
|
intent.putExtra(SCBHeader.SCB_REQ_HEADER_REQUEST_ID, UUID.randomUUID().toString());
|
||
|
for (String str : map.keySet()) {
|
||
|
intent.putExtra(str, map.get(str));
|
||
|
}
|
||
|
ActivityCompat.lQ_(activity, intent, i, null);
|
||
|
}
|
||
|
}
|