AKFaceTec


The new AKFaceTec library includes more features for recognizing the user. We recommend using it if your use case requires support for multiple ID cards.

9.7.34 🚀 Latest

The AKFaceTec library allows you to secure the user's identity through facial recognition and capture the user's ID card using FaceTec technology. This library is optional and depends on your use case.

Contact support to obtain the step for registering in the AKCore class.

Quick start


Add facetec as a dependency in your build.gradle app.

build.gradle:app
implementation 'com.autentikar:facetec:9.7.34'

This dependency is equivalent to the facetec library. Therefore, if you have the face library as a dependency, please remove it from your build.gradle and replace it with facetec. The implementation is the same, but the method names have changed.

Dependencies


AKFaceTecSDK depends on CoreSDK so you have to add CoreSDK as a dependency in your build.gradle app.

FaceSDK library depends on FaceTecSDK library current version is 9.7.34. You don't need to add it as a dependency.

Set up


Initialize SDK

Before continuing, you can set up the SDK with the following code, we recommend that you do this in the Application class:

Kotlin
import com.autentikar.core.init.AKCore
import com.autentikar.core.data.types.AKStepType
import com.autentikar.facetec.init.AKFaceTec

AKCore.register(AKFaceTec.getProtocol(AKStepType.yourStepProvidedBySupport))
Java
import com.autentikar.core.init.AKCore;
import com.autentikar.core.data.types.AKStepType;
import com.autentikar.facetec.init.AKFaceTec;

AKCore.register(AKFaceTec.getProtocol(AKStepType.yourStepProvidedBySupport));

This will register facetec in the AKCore class. This activity will be launched to capture the user's face or ID card. It is mandatory to register this activity in the AKCore class.

Custom Theme


For custom loading screen use FaceTecCustom() function and call to setCustomization(customization: FaceTecCustom). To custom view in FaceTec invoke the following code:

Kotlin
import com.autentikar.facetec.init.AKFaceTec
import com.autentikar.facetec.ui.customization.FaceTecCustom

private fun autentikarCustomUI() {
  val faceTecCustom = FaceTecCustom()
  faceTecCustom.backgroundColor = Color.parse("#yourBackgroundColor")
  faceTecCustom.showBackgroundImage = true | false
  faceTecCustom.backgroundImage = R.drawable.your_background_image
  faceTecCustom.textColor = Color.parse("#yourTextColor")
  faceTecCustom.showLogo = true | false
  faceTecCustom.logo = R.drawable.yourLogo
  faceTecCustom.progressBarColor = Color.parse("#yourProgressBarColor")
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
    faceTecCustom.customFontTypeface = resources.getFont(R.font.your_custom_font)
  } else {
    faceTecCustom.customFontTypeface = your_custom_font_typeface // example: ResourcesCompat.getFont(this, R.font.yout_font)
  }
  AKFaceTec.setCustomization(faceTecCustom)
}
Java
import com.autentikar.facecapture.init.AKFaceTec;
import com.autentikar.facecapture.ui.customization.FaceTecCustom;

private void autentikarCustomUI() {
  FaceTecCustom faceTecCustom = new FaceTecCustom();

  faceTecCustom.setBackgroundColor(yourBackgroundColor);
  faceTecCustom.setTextColor(yourTextColor);
  faceTecCustom.setShowLogo(true | false);
  faceTecCustom.setLogo(R.drawable.yourLogo);
  faceTecCustom.setProgressBarColor(yourProgressBarColor);
  faceTecCustom.setShowBackgroundImage(true | false);
  faceTecCustom.setBackgroundImage(R.drawable.your_background_image);
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
    faceTecCustom.setCustomFontTypeface(getResources().getFont(R.font.your_custom_font));
  } else {
    faceTecCustom.setCustomFontTypeface(Typeface.createFromAsset(getAssets(), "fonts/your_custom_font.ttf")); // example: Typeface.createFromAsset(assets, "fonts/your_custom_font.ttf")
  }
  // set customizations
  AKFaceTec.setCustomization(faceTecCustom);
}

For customizing the Capture Face UI you need add a facetec-dependency dependency, this dependency is needed to use the FaceTecCustomization() function.

Properties

FaceTecCustom class corresponds to the preloading screen. It has the following properties:

  • backgroundColor: The background color.
  • showBackgroundImage: Show or hide the background image (default is false).
  • backgroundImage: The background image (if showBackgroundImage is false this image not show).
  • showLogo: Show or hide the logo (default is true).
  • logo: The logo bottom (if showLogo is false this image not show).
  • progressBarColor: The color of progress bar.
  • textColor: The color of text.
  • customFontTypeface: The custom font typeface.

Texts


For change the texts of the preloading screen, you can override the following strings in your strings.xml file:

If you want to change the texts, you have to add strings.xml (es) file in your project for spanish language.
strings.xml
<string name="ak_facetec_face_start">Starting Face Capture</string>
<string name="ak_facetec_face_end">Ending Face Capture</string>
<string name="ak_facetec_result_screen_success_message">Confirmed\nCapture</string>
<string name="ak_facetec_card_id_start">Starting Card ID Capture</string>
<string name="ak_facetec_card_id_end">Ending Card ID Capture</string>

<string name="ak_face_alert_ok">OK</string>
<string name="ak_face_not_capture_init_alert">Capture not started</string>
<string name="ak_face_capture_not_responding_alert">Face capture not responding. Try again</string>
<string name="ak_face_failed_capture">Failed to capture face.</string>
<string name="ak_face_invalid_capture">Invalid capture</string>
<string name="ak_card_capture_not_responding_alert">ID Card capture not responding. Try again</string>

<string name="ak_face_img_autentikar">logo autentikar</string>

<string name="FaceTec_front_side_upload_started">Uploading\nEncrypted\nID Scan</string>
<string name="FaceTec_front_side_still_uploading">Still Uploading...\nSlow Connection</string>
<string name="FaceTec_front_side_upload_complete_awaiting_response">Upload Complete</string>
<string name="FaceTec_front_side_upload_complete_awaiting_processing">Processing\nID Scan</string>
<string name="FaceTec_back_side_upload_started">Uploading\nEncrypted\nBack of ID</string>
<string name="FaceTec_back_side_still_uploading">Still Uploading...\nSlow Connection</string>
<string name="FaceTec_back_side_upload_complete_awaiting_response">Upload Complete</string>
<string name="FaceTec_back_side_upload_complete_awaiting_processing">Processing\nBack of ID</string>
<string name="FaceTec_user_confirmed_info_upload_started">Uploading\nYour Confirmed Info</string>
<string name="FaceTec_user_confirmed_info_still_uploading">Still Uploading...\nSlow Connection</string>
<string name="FacTec_user_confirmed_info_upload_complete_awaiting_response">Upload Complete</string>
<string name="FacTec_user_confirmed_info_upload_complete_awaiting_processing">Processing</string>
<string name="FaceTec_nfc_upload_started">Uploading Encrypted\nNFC Details</string>
<string name="FaceTec_nfc_still_uploading">Still Uploading...\nSlow Connection</string>
<string name="FaceTec_nfc_upload_complete_awaiting_response">Upload Complete</string>
<string name="FaceTec_nfc_upload_complete_awaiting_processing">Processing\nNFC Details</string>
<string name="FaceTec_skipped_NFC_upload_started">Uploading Encrypted\nID Details</string>
<string name="FaceTec_skipped_NFC_upload_uploading">Still Uploading...\nSlow Connection</string>
<string name="FaceTec_skipped_NFC_upload_complete_awaiting_response">Upload Complete</string>
<string name="FaceTec_skipped_NFC_upload_complete_awaiting_processing">Processing\nID Details</string>
<string name="FaceTec_success_front_side">ID Scan Complete</string>
<string name="FaceTec_success_front_side_back_next">Front of ID\nScanned</string>
<string name="FaceTec_success_front_side_NFC_next">Front of ID\nScanned</string>
<string name="FaceTec_success_back_side">Back of ID\nScanned</string>
<string name="FaceTec_success_back_side_NFC_next">Back of ID\nScanned</string>
<string name="FaceTec_success_passport">Passport Scan Complete</string>
<string name="FaceTec_success_passport_NFC_next">Passport Scanned</string>
<string name="FaceTec_success_user_confirmation">Photo ID Scan\nComplete</string>
<string name="FaceTec_success_NFC">ID Scan Complete</string>
<string name="FaceTec_retry_face_did_not_match">Face Did not Match \nHighly Enough</string>
<string name="FaceTec_retry_ID_not_fully_visible">ID Document\nNot Fully Visible</string>
<string name="FaceTec_retry_OCR_result_not_good_enogh">ID Text Not Legible</string>
<string name="FaceTec_retry_ID_type_not_supported">ID Type Mismatch\nPlease Try Again</string>
<string name="FaceTec_skip_or_error_NFC">Photo ID Scan\nComplete</string>
strings.xml (es)
<string name="ak_facetec_face_start">Iniciando Captura Facial</string>
<string name="ak_facetec_face_end">Finalizando Captura Facial</string>
<string name="ak_facetec_result_screen_success_message">Captura\nConfirmada</string>

<string name="ak_facetec_card_id_start">Iniciando Captura Cedula</string>
<string name="ak_facetec_card_id_end">Finalizando Captura Cedula</string>

<string name="ak_face_alert_ok">OK</string>
<string name="ak_face_not_capture_init_alert">No se ha iniciado la captura</string>
<string name="ak_face_capture_not_responding_alert">No responde la captura facial. Intenta de nuevo</string>
<string name="ak_face_failed_capture">No se ha logrado capturar el rostro.</string>
<string name="ak_face_invalid_capture">Captura inválida</string>
<string name="ak_card_capture_not_responding_alert">No responde la captura cédula. Intenta de nuevo</string>

<string name="ak_face_img_autentikar">logo autentikar</string>

<string name="FaceTec_action_im_ready">ESTOY LISTO</string>
<string name="FaceTec_action_try_again">INTENTAR DE NUEVO</string>

<string name="FaceTec_camera_permission_header">Habilitar cámara</string>
<string name="FaceTec_camera_permission_message_enroll">Por favor, active\nsu cámara.</string>
<string name="FaceTec_camera_permission_message_auth">Los permisos de tu cámara están deshabilitados. toque a continuación, para editar su configuración.</string>
<string name="FaceTec_camera_permission_enable_camera">HABILITAR CÁMARA</string>
<string name="FaceTec_camera_permission_launch_settings">AJUSTES DE LANZAMIENTO</string>

<string name="FaceTec_feedback_center_face">Centra Tu Cara</string>
<string name="FaceTec_feedback_face_not_found">Enmarca Tu Rostro</string>
<string name="FaceTec_feedback_face_not_looking_straight_ahead">Mira Hacia Adelante</string>
<string name="FaceTec_feedback_face_not_upright">Mantenga La Cabeza Recta</string>
<string name="FaceTec_feedback_hold_steady">Mantengase Estable</string>
<string name="FaceTec_feedback_move_phone_away">Aléjese</string>
<string name="FaceTec_feedback_move_phone_closer">Muévete Mas Cerca</string>
<string name="FaceTec_feedback_move_phone_even_closer">Aún Más Cerca</string>
<string name="FaceTec_feedback_move_phone_to_eye_level">Levante La Cámara Hasta El Nivel De Los Ojos</string>
<string name="FaceTec_feedback_use_even_lighting">Rostro Más Claro De Manera Más Uniforme</string>
<string name="FaceTec_instructions_header_ready_1">Prepárate para</string>
<string name="FaceTec_instructions_header_ready_2">tu video selfie</string>
<string name="FaceTec_instructions_message_ready_1">Enmarca tu rostro.</string>
<string name="FaceTec_instructions_message_ready_2">Presione ESTOY LISTO y muévase más cerca.</string>
<string name="FaceTec_presession_frame_your_face">Enmarca Tu Rostro En El Óvalo</string>
<string name="FaceTec_presession_position_face_straight_in_oval">Mira hacia adelante</string>
<string name="FaceTec_presession_hold_steady_3">Manténgase firme durante: 3</string>
<string name="FaceTec_presession_hold_steady_2">Manténgase firme durante: 2</string>
<string name="FaceTec_presession_hold_steady_1">Manténgase firme durante: 1</string>
<string name="FaceTec_presession_eyes_straight_ahead">Mira hacia adelante</string>
<string name="FaceTec_presession_remove_dark_glasses">Quitate las gafas oscuras</string>
<string name="FaceTec_presession_neutral_expression">Expresión neutral, sin sonreír</string>
<string name="FaceTec_presession_conditions_too_bright">Condiciones demasiado brillantes</string>
<string name="FaceTec_presession_brighten_your_environment">Ilumina tu entorno</string>
<string name="FaceTec_result_facescan_upload_message">Procesando Imagen</string>
<string name="FaceTec_retry_header"> Intentemos eso nuevamente </string>
<string name="FaceTec_retry_subheader_message"> Pero primero, eche un vistazo a su foto y corrija su entorno. </string>
<string name="FaceTec_retry_instruction_message_1"> Expresión neutra, sin sonreír </string>
<string name="FaceTec_retry_instruction_message_2"> Sin deslumbramiento o iluminación extrema </string>
<string name="FaceTec_retry_instruction_message_3"> Demasiado borrosa, limpia tu cámara </string>
<string name="FaceTec_retry_your_image_label"> Tu Selfie </string>
<string name="FaceTec_retry_ideal_image_label"> Pose ideal </string>
<string name="FaceTec_front_side_upload_started">Subiendo\nEncriptado\nEscaneo de ID</string>
<string name="FaceTec_front_side_still_uploading">Aún subiendo...\nConexión lenta</string>
<string name="FaceTec_front_side_upload_complete_awaiting_response">Carga Completa</string>
<string name="FaceTec_front_side_upload_complete_awaiting_processing">Procesando\nEscaneo de ID</string>
<string name="FaceTec_back_side_upload_started">Subiendo\nEncriptado\nPosterior de ID</string>
<string name="FaceTec_back_side_still_uploading">Aún subiendo...\nConexión lenta</string>
<string name="FaceTec_back_side_upload_complete_awaiting_response">Carga Completa</string>
<string name="FaceTec_back_side_upload_complete_awaiting_processing">Procesando\nPosterior de ID</string>
<string name="FaceTec_user_confirmed_info_upload_started">Subiendo\nTu información</string>
<string name="FaceTec_user_confirmed_info_still_uploading">Aún subiendo...\nConexión lenta</string>
<string name="FacTec_user_confirmed_info_upload_complete_awaiting_response">Carga Completa</string>
<string name="FacTec_user_confirmed_info_upload_complete_awaiting_processing">Procesando</string>
<string name="FaceTec_nfc_upload_started">Subiendo detalles\nNFC encriptados</string>
<string name="FaceTec_nfc_still_uploading">Aún subiendo...\nConexión lenta</string>
<string name="FaceTec_nfc_upload_complete_awaiting_response">Carga Completa</string>
<string name="FaceTec_nfc_upload_complete_awaiting_processing">Procesando\nDetalles NFC</string>
<string name="FaceTec_skipped_NFC_upload_started">Subiendo detalles\nID encriptados</string>
<string name="FaceTec_skipped_NFC_upload_uploading">Aún subiendo...\nConexión lenta</string>
<string name="FaceTec_skipped_NFC_upload_complete_awaiting_response">Carga Completa</string>
<string name="FaceTec_skipped_NFC_upload_complete_awaiting_processing">Procesando\nDetalles de ID</string>
<string name="FaceTec_success_front_side">Escaneo completo</string>
<string name="FaceTec_success_front_side_back_next">Parte Frontal ID\nEscaneando</string>
<string name="FaceTec_success_front_side_NFC_next">Parte Frontal ID\nEscaneado</string>
<string name="FaceTec_success_back_side">Parte Posterior ID\nEscaneado</string>
<string name="FaceTec_success_back_side_NFC_next">Parte Posterior ID\nEscaneado</string>
<string name="FaceTec_success_passport">Escaneo\nPasaporte Completo</string>
<string name="FaceTec_success_passport_NFC_next">Pasaporte Escaneado</string>
<string name="FaceTec_success_user_confirmation">Escaneo de ID\nCompleto</string>
<string name="FaceTec_success_NFC">Escaneo de ID\nCompleto</string>
<string name="FaceTec_retry_face_did_not_match">El rostro no coincidió</string>
<string name="FaceTec_retry_ID_not_fully_visible">Documento\nNo completamente visible</string>
<string name="FaceTec_retry_OCR_result_not_good_enogh">Texto de ID no legible</string>
<string name="FaceTec_retry_ID_type_not_supported">Inconsistencia ID\nPor favor, inténtalo de nuevo</string>
<string name="FaceTec_skip_or_error_NFC">Escaneo de ID\nCompleto</string>