Cordova Plugin Version 2

Cordova Plugin Version 2

Index

activateEDKLicense
activateEDKLicense(onSuccess, onError, key, customerID);
Parameter:
  • onSuccess: (required) callback method
    Method to be invoked if the call into the plugin is successful.
  • onError: (reqiured) callback method
    Method to be invoked in case of an error. (can be null)
  • key: (required) String value
    Insert the key from the file you have received when purchasing a license.
  • customerID: (required) String value
    As a registered customer you will receive a customerID. Enter your customer ID here.
Description:

This method must be called every time the app starts after successful returning from the initCaptureID method call.

return:

The return value is always of type Result Struct.
The fields of the struct are filled dependend on the method call. 

FunctionName: “onActivationResult”

error: a value of 0 indicates that the call has succeeded.

boolValue: true = the license activation was successful.

the remaining values of the result struct are unused.

decoderVersion
decoderVersion(onSuccess, onError?);
Parameter:
  • onSuccess: (required) callback method,
    method to be invoked on success
  • onError: (optional) callback method.
    method to be invoked on errror. Can be null.
Description:

Retrieve the license version string from the TachyonIQ decoder.

The return value is always of type Result Struct.
The fields of the struct are filled dependend on the method call. 

FunctionName: “decoderVersion”

error: a value of 0 indicates the successful return from the method call.

stringValue: a string representing the TachyonIQ decoder library version

the remainig fields of the Result Struct are unused.

decoderVersionLevel
decoderVersionLevel(onSuccess, onError?);
Parameter:
  • onSuccess: (required) callback method,
    method to be invoked on success
  • onError: (optional) callback method.
    method to be invoked on errror. Can be null.
Description:

Retrieves the version level string from the TachyonIQ decoder.

The return value is always of type Result Struct.
The fields of the struct are filled dependend on the method call. 

FunctionName: “decoderVersionLevel”

error: a value of 0 indicates the successful return from the method call.

stringValue: a string representing the TachyonIQ decoder library version level

the remainig fields of the Result Struct are unused.

getSdkVersion
getSdkVersion(onSuccess, onError?);

 

Parameter:
  • onSuccess: (required) callback method
    method to be invoked if the call into the plugin is successful.
  • onError: (optional) callback method
    method to be invoked in case of an error. Can be null
Description:

Retrieve the SDK Version from the TachyonIQ library.

Returns:

The return value is always of type Result Struct.
The fields of the struct are filled dependend on the method call.

FunctionName: “getSdkVersion”

error: a value of 0 indicates success.

stringValue: a string representing the SDK Version form the TachyonIQ Decoder library.

the remaining values of the Result Struct are unused.

initCaptureID
initCaptureID(onSuccess, onError, message, useCallback, requestPermsOnInit​);
Parameter:
  • onSuccess: (required) callback method
    Method to be invoked if the call into the plugin is successful.
  • onError: (reqiured) callback method
    Method to be invoked in case of an error. (can be null)
  • message: (required) String value
    The message text is displayed in a standard message box on the screen before the user will be asked for permissions. If you provide an empty string no message box is displayed.
  • useCallback: (required) boolean value
    true = the text in the message paramter is ignored instead of showing a message box the onSuccess callback is invoked with a FunctionName of “requestPermissionCallback” in the result struct. You can use this additonal invokation to show a userfriendly page with detailed description why your app requires the permissions before requesting them.
    false = the onSuccess callback is called with a FunctionName of “initCaptureID” after completing initialization.
  • requestPermsOnInit: (required) boolean value
    true = permission request occurs immediately.
    false = the permission is requested on the first usage of a method that requires them.
Description:

This method initializes the CaptureID Plugin and request the required permissions for Android or iOS.
The requested permissions are required for the library to work as expected. The parameters of this method can be used to take a little impact on the way how the user is navigated through the initialization process.
You can use this to display the user explanations or your privacy policy before the permission request.

Return:

The return value is always of type Result Struct.
The fields of the struct are filled dependend on the method call. 

FunctionName: “onPermissionCallback”

error: a value of 0 indicates that the method call has succeeded

objValue: array of strings each representing a value of a required permission

the remaining values of the result struct are unused

isLicenseActivated
isLicenseActivated(onSuccess, onError?);
Parameter:
  • onSuccess: (required) callback method.
    Method that is invoked in case of success.
  • onError: (optional) callback method
    Method that is invoked in case of an error.
Description:

This method is used to check whether license is activated or not.

Return:

The return value is always of type Result Struct.
The fields of the struct are filled dependend on the method call. 

FunctionName: “isLicenseActivated”

error: a value of 0 indicates that the call has succeeded.

boolValue: true = the license is activated otherwise false

the remaining values of the result struct are unused.

isLicenseExpired
isLicenseExpired(onSuccess, onError?);
Parameter:
  • onSuccess: (required) callback method
    Method to be invoked in case of success
  • onError: (optional) callback method
    Method to be invoked in case of an error
Description:

Checks whether the license is expired.

Return:

The return value is always of type Result Struct.
The fields of the struct are filled dependend on the method call. 

FunctionName: “isLicenseExpired”

error: a value of 0 indicates that the call has succeeded.

boolValue: true = the license has expired otherwise false.

the remaining values of the result struct are unused.

requestPermissions
requestPermissions(onSuccess, onError, permissions);
Parameter:
  • onSuccess:(required) callback method
    Method to be invoked in case of success.
  • onError: (required) callback method can be null
    Method to be invoked in case of an error.
  • permissons: (required) array of strings
    each string must represent a valid permission to request for.
Description:

Request for the permissions required by your app.

Return:

The return value is always of type Result Struct.
The fields of the struct are filled dependend on the method call. 

FunctionName: “onPermissionGranted” or “onPermissionDenied”

error: a value of 0 indicates that the method call has succeeded.

intValue: index of the requested Permission. this value is decremented on each invokation of the callback function. A value of 1 indicates the last turn. Use this value to only run a method once.

boolValue: true = the user has accepted.
false = the user has denied access.

the remaining fields of the Result Struct are unused.