SDK reference · Cordova SDK / Cordova Getting Started

SDK Modes

This page describes the SDK modes available for the Incode Onboarding Cordova Plugin and how to configure them. The SDK supports three modes that control whether captured images are uploaded and validated server-side.

Warning

Android only

SDK Modes are only supported on Android in the Cordova SDK.

Available modes

  • standard: The default. Captured images are uploaded to Incode's servers and validated. Use this mode for standard onboarding flows.
  • captureOnly: Skips image upload and server validation for ID and Selfie scans. Use this mode when you want to capture images on the device without server-side processing.
  • submitOnly: Submit previously captured data without performing new captures.

Set the SDK mode

Call setSdkMode() to change modes. If you do not call this method, the SDK uses standard.

cordova.exec(
  function () { console.log("SDK mode set"); },
  function (err) { console.log("Error:", err); },
  "Cplugin",
  "setSdkMode",
  ["captureOnly"]  // "standard" | "captureOnly" | "submitOnly"
);

When to call setSdkMode()

Call setSdkMode() after initialization and before startOnboarding() (or startOnboardingSection()). Do not call setSdkMode() mid-session; doing so is not an error, but it can cause undefined behavior.

The SDK preserves the set mode for the next session.

Was this page helpful?