Package com.geniusscansdk.scanflow
Class PluginBridge
java.lang.Object
com.geniusscansdk.scanflow.PluginBridge
This class contains static methods that should be used to interface with plugins (Cordova, React Native...).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PromiseResult
generateDocument
(Context context, Map<String, Object> documentMap, Map<String, Object> configurationMap) static PromiseResult
getPromiseResultFromActivityResult
(Context context, int requestCode, int resultCode, Intent data) Convert the intent response into aPromiseResult
.static void
scanWithConfiguration
(Activity activity, Map<String, Object> configuration) static PromiseResult
setLicenseKey
(Context context, String licenseKey) Initialize the SDK with a license key.
-
Constructor Details
-
PluginBridge
public PluginBridge()
-
-
Method Details
-
scanWithConfiguration
-
getPromiseResultFromActivityResult
public static PromiseResult getPromiseResultFromActivityResult(Context context, int requestCode, int resultCode, @Nullable 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
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
-