mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +08:00
Add hasReturnValue() so that PluginManager can make decision to run an action sync or async.
This commit is contained in:
parent
a21080fb76
commit
2b015164f4
@ -17,12 +17,20 @@ public interface Plugin {
|
||||
/**
|
||||
* Executes the request and returns PluginResult.
|
||||
*
|
||||
* @param action The plugin to execute.
|
||||
* @param args JSONArry of arguments for the plugin.
|
||||
* @return A PluginResult object with a status and message.
|
||||
* @param action The action to execute.
|
||||
* @param args JSONArry of arguments for the plugin.
|
||||
* @return A PluginResult object with a status and message.
|
||||
*/
|
||||
PluginResult execute(String action, JSONArray args);
|
||||
|
||||
/**
|
||||
* Identifies if action to be executed returns a value.
|
||||
*
|
||||
* @param action The action to execute
|
||||
* @return T=returns value
|
||||
*/
|
||||
public boolean hasReturnValue(String action);
|
||||
|
||||
/**
|
||||
* Sets the context of the Plugin. This can then be used to do things like
|
||||
* get file paths associated with the Activity.
|
||||
|
Loading…
Reference in New Issue
Block a user