Class: License

License()

new License()

Methods

getDaysRemaining(successCallback, errorCallback)

Method to get the remaining days that the SDK license would be valid to use.
Parameters:
Name Type Description
successCallback function Default Success call back function name
errorCallback function Default Error call back function name
See:
  • Check the 'errorCallback' method for any failures in case of unexpected behaviour of the method. Generally the error call back would return a JSON object with ErrorMsg & ErrorDesc' giving the description of the error.
Returns:
The return value is captured in the 'successCallback' function and will be having the number of days remaining in the current license for a valid license.
Example
function successCallback(result){
   alert(JSON.stringify(result));
}
function errorCallback(error){
   alert(JSON.stringify(error));
}

var LicObj = kfxCordova.kfxUtilities.createLicense();
var licenseString = 'pasteyourlicensestringhere!';
LicObj.setMobileSDKLicense(successCallback,errorCallback,licenseString);
LicObj.getDaysRemaining(successCallback,errorCallback);

getLicenseTypes()

Get the License supported LicenseTypes
Example
var LicObj = kfxCordova.kfxUtilities.createLicense();
var licenseTypes = LicObj.getLicenseTypes();
licenseTypes should be like below {
          IMAGE_CAPTURE       :  "IMAGE_CAPTURE",
          IMAGE_PROCESSING    :  "IMAGE_PROCESSING",
          BARCODE_CAPTURE     :   "BARCODE_CAPTURE",
          LOGISTICS           :  "LOGISTICS",
          ID_EXTRACTION       :  "ID_EXTRACTION"
  };

getSDKVersions(successCallback, errorCallback)

Method to get version string for the Kofax Mobile SDK as a whole. It also provides access to the version information of the Utility package and the Kofax Image Processor and Classifier libraries
Parameters:
Name Type Description
successCallback function Default Success call back function name
errorCallback function Default Error call back function name
See:
  • Check the 'errorCallback' method for any failures in case of unexpected behaviour of the method. Generally the error call back would return a JSON object with ErrorMsg & ErrorDesc' giving the description of the error.
Returns:
JSON object representing version string is returned in the 'successCallback' function.
Example
function successCallback(result){
      alert(JSON.stringify(result));
}
function errorCallback(error){
      alert(JSON.stringify(error));
}
var LicObj = kfxCordova.kfxUtilities.createLicense();
var licenseString = 'pasteyourlicensestringhere!';
LicObj.setMobileSDKLicense(successCallback,errorCallback,licenseString);
LicObj.getSDKVersions(successCallback,errorCallback);

setMobileSDKLicense(successCallback, errorCallback, licenseString)

Method to set the License of the native SDK. The input to this method is the VRS license string. If the license string is valid and days remain in the license, this method returns KMC_SUCCESS . If the license string is valid but no days remain in the license, this method returns KMC_IP_LICENSE_EXPIRED. If the license string is not valid, this method returns KMC_IP_LICENSE_INVALID. Any failure to set the license would automatically set the daysRemaining to zero.The license can only be set once.
Parameters:
Name Type Description
successCallback function Default Success call back function name
errorCallback function Default Error call back function name
licenseString String is the valid license string that was contained in a distributed header file that you received from Kofax.
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions successCallback - KMC_SUCCESS The license string was set successfully . errorCallback - KMC_IP_LICENSE_INVALID if the license string used is nil. KMC_IP_LICENSE_ALREADY_SET if you have already set the license. EVRS_IP_LICENSING_FAILURE if the license string is invalid for setting a license. EVRS_IP_LICENSE_EXPIRATION_ERROR if the time limit of your license has expired. Example code follows showing how to set your license.
Example
var licenseString = 'pasteyourlicensestringhere!';

function successCallback(result){
      alert(JSON.stringify(result));
}
function errorCallback(error){
      alert(JSON.stringify(error));
}

var LicObj = kfxCordova.kfxUtilities.createLicense();
LicObj.setMobileSDKLicense(successCallback,errorCallback,licenseString);