Class PluginBridge

  • public class PluginBridge
    extends java.lang.Object
    This class contains static methods that should be used to interface with plugins (Cordova, React Native...).
    • Constructor Detail

      • PluginBridge

        public PluginBridge()
    • Method Detail

      • getPromiseResultFromActivityResult

        public static PromiseResult getPromiseResultFromActivityResult​(android.content.Context context,
                                                                       int requestCode,
                                                                       int resultCode,
                                                                       android.content.Intent data)
        Convert the intent response into a PromiseResult.
        context - A context used to serialize the response object
        requestCode - The request code received by the onActivityResult method
        resultCode - The result code received by the onActivityResult method
        data - The data received by the onActivityResult method
        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.
        context - A context used the verify the license key
        licenseKey - The license key
        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)