Legacy On Android SDK
1.7.0
1.7.0
  • Introduction
  • Overview
    • Requirements
    • Prerequisites
    • Downloading
    • Setup
    • Initialization
      • Custom headers
    • BiometridOn
      • Create process
      • Get current step
      • Get previous step
      • Get remaining steps
      • Get completed steps
      • Get process data
      • Submit form
      • Submit file
      • Submit selfie with ID card
      • Submit form with files
      • Submit multiple files
      • Submit ID document
      • Video conference
    • Liveness Detection
      • Basic detection
      • Liveness Customisation
      • Generate Liveness Surface
  • Enums
    • StepType
    • VideoConferenceState
    • Doctype
Powered by GitBook
On this page
  1. Overview
  2. Initialization

Custom headers

It's possible to send adicional headers in every request made from the SDK. In order to achieve this the developer should use this constructor instead:

BiometridOn.getInstance().init(
       POLYGON_API_URL
       POLYGON_API_KEY,
       POLYGON_API_SECRET,
       POLYGON_API_FLOW_ID,       
       CONTEXT).setCustomHeaders(Map<String, String> custom_headers);

Name:

Description:

POLYGON_API_KEY

Key credential provided

POLYGON_API_SECRET

Secret credential provided

POLYGON_API_FLOW_ID

ID credential provided

POLYGON_API_URL

URL credential provided

allow_pusher

Option to use Pusher or not

custom_headers

Map of custom headers <KEY, VALUE>

Implementation example

public class Example extends Application implements OnInitializationCallback {

    private final static String BIOMETRID_SERVER_URL = "";
    private final static String BIOMETRID_CREDENTIAL_KEY = "";
    private final static String BIOMETRID_CREDENTIAL_SECRET = "";
    private final static String BIOMETRID_CREDENTIAL_FLOW_ID = "";

    @Override
    public void onCreate() {
        super.onCreate();
        
        Map<String, String> headers = new HashMap<>();
        headers.put("KEY", "VALUE");

        BiometridLibrary.getInstance().init(
                POLYGON_API_URL,
                POLYGON_API_KEY,
                POLYGON_API_SECRET,
                POLYGON_API_FLOW_ID,
                getApplicationContext()).setCustomHeaders(headers);
    }

    @Override
    public void onInitCallback(@NonNull Boolean aBoolean, @Nullable Errors errors) {

    }    
}
PreviousInitializationNextBiometridOn

Last updated 5 years ago