Package com.geniusscansdk.scanflow
Class ScanFlow
- java.lang.Object
-
- com.geniusscansdk.scanflow.ScanFlow
-
public class ScanFlow extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intSCAN_REQUEST
-
Constructor Summary
Constructors Constructor Description ScanFlow()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static android.content.IntentcreateScanFlowIntent(android.content.Context context, ScanConfiguration scanConfiguration)static ScanResultgetScanResultFromActivityResult(android.content.Intent result)Extract the result of the scan flow if it was successful or throws an error if something went wrong.static voidinit(android.content.Context context, java.lang.String licenseKey)Initialize the SDK with a license key.static voidscanWithConfiguration(android.app.Activity activity, ScanConfiguration scanConfiguration)Start a scan flow to capture several pages and process them.
-
-
-
Field Detail
-
SCAN_REQUEST
public static final int SCAN_REQUEST
- See Also:
- Constant Field Values
-
-
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 anActivityso theactivityparameter needs to implement theonActivityResultmethod, check theresultCodeand callgetScanResultFromActivityResult(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.
-
createScanFlowIntent
public static android.content.Intent createScanFlowIntent(android.content.Context context, ScanConfiguration scanConfiguration)
-
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.geniusscansdk.core.LicenseExceptionInitialize the SDK with a license key.- Parameters:
context- A context used the verify the license keylicenseKey- The license key- Throws:
-
com.geniusscansdk.core.LicenseException- if the license key is not valid anymore or does not match the application ID.
-
-