public abstract class CordovaAction
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
action |
protected org.json.JSONArray |
args |
protected CallbackContext |
callbackContext |
protected CordovaInterface |
cordova |
| Constructor and Description |
|---|
CordovaAction(java.lang.String action,
org.json.JSONArray args,
CallbackContext callbackContext,
CordovaInterface cordova) |
| Modifier and Type | Method and Description |
|---|---|
protected org.json.JSONObject |
checkJsonArgs(org.json.JSONArray args,
java.lang.String[] reqArgs)
Tests if args are available and all required parameters exist.
|
java.lang.String |
getAction() |
void |
run()
Log a message which action is running
|
protected java.lang.String action
protected org.json.JSONArray args
protected CallbackContext callbackContext
protected CordovaInterface cordova
public CordovaAction(java.lang.String action,
org.json.JSONArray args,
CallbackContext callbackContext,
CordovaInterface cordova)
public java.lang.String getAction()
protected org.json.JSONObject checkJsonArgs(org.json.JSONArray args,
java.lang.String[] reqArgs)
throws org.json.JSONException,
java.lang.Exception
args - JSONArray where at index 0 a JSONObect is expectedreqArgs - String[] which lists all required argsorg.json.JSONExceptionjava.lang.Exceptionpublic void run()
run in interface java.lang.Runnable