Cordova SDK Reference
Interface cordova/exec
cordova/exec
Represents the JavaScript interface to communicate with native SDK.
For obtaining the instance declare the following:
declare var cordova: any;
var exec = cordova.require("cordova/exec"); // this line for Cordova only
Lambda function function(dataset) {}
function(dataset) {}
A success callback function. Assuming your exec call completes successfully, and the param is the collected dataset
Lambda functionfunction(error) {}
function(error) {}
An error callback function. If the operation does not complete successfully, this function executes with an optional error parameter.
"service"
The service name to call on the native side. This corresponds to a native class, for which more information is available in the native guides listed below. (The value must be - CredoAppSdk)
"action"
The action name to call on the native side. This generally corresponds to the native class method. See the native guides listed below. (The value must be - execute)
Returns:
Type | Description |
---|---|
String | Returns JSON dataset in compressed string format if collect action is succeeded |
Error Codes
Status Code | Reason | Description |
---|---|---|
30 | Duplicated areas error | The extracting areas are duplicated. |
90 | Unknown error | An unexpected error occurred. |
Updated about 2 months ago