forked from github/cordova-android
Add callbackId to Plugin.execute() so result can be sent back when overlapping calls to same plugin occur.
This commit is contained in:
@@ -35,13 +35,14 @@ public class AudioHandler extends Plugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the request and returns CommandResult.
|
||||
* Executes the request and returns PluginResult.
|
||||
*
|
||||
* @param action The command to execute.
|
||||
* @param args JSONArry of arguments for the command.
|
||||
* @return A CommandResult object with a status and message.
|
||||
* @param action The action to execute.
|
||||
* @param args JSONArry of arguments for the plugin.
|
||||
* @param callbackId The callback id used when calling back into JavaScript.
|
||||
* @return A PluginResult object with a status and message.
|
||||
*/
|
||||
public PluginResult execute(String action, JSONArray args) {
|
||||
public PluginResult execute(String action, JSONArray args, String callbackId) {
|
||||
PluginResult.Status status = PluginResult.Status.OK;
|
||||
String result = "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user