Class GeniusScanSdkUI


  • public class GeniusScanSdkUI
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int SCAN_REQUEST  
    • Constructor Summary

      Constructors 
      Constructor Description
      GeniusScanSdkUI()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ScanResult getScanResultFromActivityResult​(android.content.Intent result)
      Extract the result of the scan flow if it was successful or throws an error if something went wrong.
      static void init​(android.content.Context context, java.lang.String licenseKey)
      Initialize the SDK with a license key.
      static void scanWithConfiguration​(android.app.Activity activity, ScanConfiguration scanConfiguration)
      Start a scan flow to capture several pages and process them.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GeniusScanSdkUI

        public GeniusScanSdkUI()
    • Method Detail

      • scanWithConfiguration

        public static void scanWithConfiguration​(android.app.Activity activity,
                                                 ScanConfiguration scanConfiguration)
        Start a scan flow to capture several pages and process them. This method will start an Activity so the activity parameter needs to implement the onActivityResult method, check the resultCode and call getScanResultFromActivityResult(Intent) to get the result scans.
        Parameters:
        activity - The activity used to start this scan flow
        scanConfiguration - The options of the scan flow, such as whether multiple pages can be captured, custom colors and which post processing operations should be applied.
      • getScanResultFromActivityResult

        public static ScanResult getScanResultFromActivityResult​(android.content.Intent result)
                                                          throws java.lang.Exception
        Extract the result of the scan flow if it was successful or throws an error if something went wrong.
        Parameters:
        result - The intent provided by the onActivityResult callback
        Returns:
        the result of the scan flow
        Throws:
        java.lang.Exception - The error thrown during the scan flow
      • init

        public static void init​(android.content.Context context,
                                java.lang.String licenseKey)
                         throws com.thegrizzlylabs.geniusscan.sdk.core.LicenseException
        Initialize the SDK with a license key.
        Parameters:
        context - A context used the verify the license key
        licenseKey - The license key
        Throws:
        com.thegrizzlylabs.geniusscan.sdk.core.LicenseException - if the license key is not valid anymore or does not match the application ID.