Dependencies

AKFaceTec

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.

9.7.94 Latest

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.

Quick start

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

implementation 'com.autentikar:facetec:9.7.94'

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.87. 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:

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:

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)
}

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.
<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>