Class ScanFlow

  • public class ScanFlow
    extends java.lang.Object
    • Constructor Detail

      • ScanFlow

        public ScanFlow()
    • Method Detail

      • scanWithConfiguration

        public static void scanWithConfiguration​( 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.
        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.
        result - The intent provided by the onActivityResult callback
        the result of the scan flow
        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.geniusscansdk.core.LicenseException
        Initialize the SDK with a license key.
        context - A context used the verify the license key
        licenseKey - The license key
        com.geniusscansdk.core.LicenseException - if the license key is not valid anymore or does not match the application ID.