public class CallbackContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
finished |
Constructor and Description |
---|
CallbackContext(java.lang.String callbackId,
CordovaWebView webView) |
Modifier and Type | Method and Description |
---|---|
void |
error(int message)
Helper for error callbacks that just returns the Status.ERROR by default
|
void |
error(org.json.JSONObject message)
Helper for error callbacks that just returns the Status.ERROR by default
|
void |
error(java.lang.String message)
Helper for error callbacks that just returns the Status.ERROR by default
|
java.lang.String |
getCallbackId() |
boolean |
isChangingThreads() |
boolean |
isFinished() |
void |
sendPluginResult(PluginResult pluginResult) |
void |
success()
Helper for success callbacks that just returns the Status.OK by default
|
void |
success(byte[] message)
Helper for success callbacks that just returns the Status.OK by default
|
void |
success(int message)
Helper for success callbacks that just returns the Status.OK by default
|
void |
success(org.json.JSONArray message)
Helper for success callbacks that just returns the Status.OK by default
|
void |
success(org.json.JSONObject message)
Helper for success callbacks that just returns the Status.OK by default
|
void |
success(java.lang.String message)
Helper for success callbacks that just returns the Status.OK by default
|
public CallbackContext(java.lang.String callbackId, CordovaWebView webView)
public boolean isFinished()
public boolean isChangingThreads()
public java.lang.String getCallbackId()
public void sendPluginResult(PluginResult pluginResult)
public void success(org.json.JSONObject message)
message
- The message to add to the success result.public void success(java.lang.String message)
message
- The message to add to the success result.public void success(org.json.JSONArray message)
message
- The message to add to the success result.public void success(byte[] message)
message
- The message to add to the success result.public void success(int message)
message
- The message to add to the success result.public void success()
public void error(org.json.JSONObject message)
message
- The message to add to the error result.public void error(java.lang.String message)
message
- The message to add to the error result.public void error(int message)
message
- The message to add to the error result.