Class PluginBridge

java.lang.Object
com.geniusscansdk.scanflow.PluginBridge

public class PluginBridge extends Object
This class contains static methods that should be used to interface with plugins (Cordova, React Native...).
  • Constructor Details

    • PluginBridge

      public PluginBridge()
  • Method Details

    • scanWithConfiguration

      public static void scanWithConfiguration(Activity activity, Map<String,Object> configuration)
    • getPromiseResultFromActivityResult

      public static PromiseResult getPromiseResultFromActivityResult(Context context, int requestCode, int resultCode, @Nullable Intent data)
      Convert the intent response into a PromiseResult.
      Parameters:
      context - A context used to serialize the response object
      requestCode - The request code received by the onActivityResult method
      resultCode - The result code received by the onActivityResult method
      data - The data received by the onActivityResult method
      Returns:
      An object containing the result of the scan flow or an error message
    • setLicenseKey

      public static PromiseResult setLicenseKey(Context context, String licenseKey)
      Initialize the SDK with a license key.
      Parameters:
      context - A context used the verify the license key
      licenseKey - The license key
      Returns:
      a result containing a success response or an error message
    • generateDocument

      public static PromiseResult generateDocument(Context context, Map<String,Object> documentMap, Map<String,Object> configurationMap)