Kofax Mobile SDK API Reference
Classes | Static Public Member Functions | List of all members
Licensing Class Reference

This class comprises the licensing mechanism for Mobile SDK. More...

Classes

interface  CustomAcquireVolumeLicenseEventListener
 The listener interface for receiving custom acquire volume license events. More...
 
class  CustomAcquireVolumeLicenseRequestData
 Data class for custom acquire volume license related operations. More...
 
enum  LicenseServerType
 An enum of license server types. Use with Licensing.setMobileSDKLicenseServer. More...
 
enum  LicenseType
 An enum of license types. More...
 
interface  VolumeLicenseEventListener
 The listener interface for receiving volume licensing events. More...
 
class  VolumeLicenseFailureData
 Data class for volume licensing related failures. More...
 
class  VolumeLicenseResultData
 Data class for volume licensing related successful operations. More...
 

Static Public Member Functions

static int getDaysRemaining ()
 Retrieve the number of days remaining in current license. More...
 
static ErrorInfo setMobileSDKLicense (String licenseStr)
 Set the Mobile SDK license. More...
 
static ErrorInfo setMobileSDKLicenseServer (String licenseServerName, LicenseServerType licenseServerType)
 
static boolean isSdkLicensed (LicenseType licenseType)
 Find out if specified license type is valid with current license. More...
 
static void acquireVolumeLicenses (LicenseType licenseType, int count)
 
static int getRemainingLicenseCount (LicenseType licenseType)
 Get the number of license volume units available on the device. More...
 
static void addVolumeLicenseEventListener (VolumeLicenseEventListener listener)
 Add the specified VolumeLicenseEventListener to receive VolumeLicenseEvents. More...
 
static void removeVolumeLicenseEventListener (VolumeLicenseEventListener listener)
 Removes the specified VolumeLicenseEventListener. More...
 
static void setCertificateValidatorListener (CertificateValidatorListener certificateValidatorListener)
 
static void setCustomAcquireVolumeLicenseEventListener (CustomAcquireVolumeLicenseEventListener customAcquireVolumeLicenseEventListener)
 

Detailed Description

This class comprises the licensing mechanism for Mobile SDK.

Call the setMobileSDKLicense method with a valid license string to get access to full Mobile SDK functionality.

Member Function Documentation

static void acquireVolumeLicenses ( LicenseType  licenseType,
int  count 
)
static

Pre-allocate units of the specified volume license type This license operation is asynchronous and the method returns immediately. To process the license event, including any errors, implement the VolumeLicenseEventListener interface in a class object and then register that object using the addVolumeLicenseEventListener method. Once the operation is complete, remove the listener.

Parameters
licenseTypetype of volume license requested, LicenseType.ID_EXTRACTION is the only type supported.
countnumber of volume units requested
static void addVolumeLicenseEventListener ( VolumeLicenseEventListener  listener)
static

Add the specified VolumeLicenseEventListener to receive VolumeLicenseEvents.

This method must be called to establish one or more application listeners. These listeners receive events indicating status of a volume license event.

Exceptions
NullPointerException
static int getDaysRemaining ( )
static

Retrieve the number of days remaining in current license.

Returns
The number of days remaining in the current license.
static int getRemainingLicenseCount ( LicenseType  licenseType)
static

Get the number of license volume units available on the device.

This method returns the number of license volume units available on the device for the specified license type. LicenseType.ID_EXTRACTION is the only type supported. Any other license type will return 0 units available. Also, if the licenseServerHostname has not been set, this method will return 0 units available.

Parameters
licenseTypetype of license to check
Returns
number of license volume units available
static boolean isSdkLicensed ( LicenseType  licenseType)
static

Find out if specified license type is valid with current license.

Returns an indication of whether or not the specified license type is included in the license string that was previously passed to setMobileSDKLicense. Also returns false if a license string was never set.

Returns
true or false.
static void removeVolumeLicenseEventListener ( VolumeLicenseEventListener  listener)
static

Removes the specified VolumeLicenseEventListener.

static void setCertificateValidatorListener ( CertificateValidatorListener  certificateValidatorListener)
static

Setter for certificate validator listener. The listener receives certificate validation challenge in response to an authentication request from the remote server.

See also
CertificateValidatorListener
Parameters
certificateValidatorListener
static void setCustomAcquireVolumeLicenseEventListener ( CustomAcquireVolumeLicenseEventListener  customAcquireVolumeLicenseEventListener)
static

Set this listener to receive CustomAcquireVolumeLicenseEvents.

See also
CustomAcquireVolumeLicenseEventListener
Parameters
customAcquireVolumeLicenseEventListener
static ErrorInfo setMobileSDKLicense ( String  licenseStr)
static

Set the Mobile SDK license.

This method sets the Mobile SDK license and populates the days remaining.

Parameters
licenseStrThe license string to set.
Returns
Status code
Return values
KMC_SUCCESS
KMC_EV_LICENSINGinvalid license
KMC_EV_LICENSE_EXPIRED
static ErrorInfo setMobileSDKLicenseServer ( String  licenseServerName,
LicenseServerType  licenseServerType 
)
static

Set the Mobile SDK license server name. This method sets the Mobile SDK license server name and type.

Parameters
licenseServerNamelicense server name. This parameter is ignored if a non-null listener has been set with setCustomAcquireVolumeLicenseEventListener(CustomAcquireVolumeLicenseEventListener listener)
licenseServerTypelicense server type.
Returns
Status code (normally KMC_SUCCESS)

For RTTI servers, the server name would typically look like

http://my-server-here/mobilesdk

For TotalAgility servers, the server name would typically look like

http://my-server-here/totalagility

The documentation for this class was generated from the following file:
Untitled Document © 2018 Kofax, Inc. All rights reserved. Use is subject to license terms.