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.

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

You can set the mode at initializeSDK() via the optional sdkMode argument, or call setSdkMode() after init. If you do neither, 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?