Package com.geniusscansdk.scanflow
Class PluginBridge
- java.lang.Object
-
- com.geniusscansdk.scanflow.PluginBridge
-
public class PluginBridge extends java.lang.ObjectThis class contains static methods that should be used to interface with plugins (Cordova, React Native...).
-
-
Constructor Summary
Constructors Constructor Description PluginBridge()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PromiseResultgenerateDocument(android.content.Context context, java.util.Map<java.lang.String,java.lang.Object> documentMap, java.util.Map<java.lang.String,java.lang.Object> configurationMap)static PromiseResultgetPromiseResultFromActivityResult(android.content.Context context, int requestCode, int resultCode, android.content.Intent data)Convert the intent response into aPromiseResult.static voidscanWithConfiguration(android.app.Activity activity, java.util.Map<java.lang.String,java.lang.Object> configuration)static PromiseResultsetLicenseKey(android.content.Context context, java.lang.String licenseKey)Initialize the SDK with a license key.
-
-
-
Method Detail
-
scanWithConfiguration
public static void scanWithConfiguration(android.app.Activity activity, java.util.Map<java.lang.String,java.lang.Object> configuration)
-
getPromiseResultFromActivityResult
public static PromiseResult getPromiseResultFromActivityResult(android.content.Context context, int requestCode, int resultCode, @Nullable android.content.Intent data)
Convert the intent response into aPromiseResult.- Parameters:
context- A context used to serialize the response objectrequestCode- The request code received by the onActivityResult methodresultCode- The result code received by the onActivityResult methoddata- 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(android.content.Context context, java.lang.String licenseKey)
Initialize the SDK with a license key.- Parameters:
context- A context used the verify the license keylicenseKey- The license key- Returns:
- a result containing a success response or an error message
-
generateDocument
public static PromiseResult generateDocument(android.content.Context context, java.util.Map<java.lang.String,java.lang.Object> documentMap, java.util.Map<java.lang.String,java.lang.Object> configurationMap)
-
-