mirror of
https://github.com/apache/cordova-android.git
synced 2026-01-30 00:05:28 +08:00
CallbackContext: Add success method for boolean (#1864)
- Add helper method for success callbacks that returns `Status.OK` with a boolean
This commit is contained in:
@@ -61,6 +61,15 @@ public class CallbackContext {
|
|||||||
webView.sendPluginResult(pluginResult, callbackId);
|
webView.sendPluginResult(pluginResult, callbackId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper for success callbacks that just returns the Status.OK by default
|
||||||
|
*
|
||||||
|
* @param message The message to add to the success result.
|
||||||
|
*/
|
||||||
|
public void success(boolean message) {
|
||||||
|
sendPluginResult(new PluginResult(PluginResult.Status.OK, message));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper for success callbacks that just returns the Status.OK by default
|
* Helper for success callbacks that just returns the Status.OK by default
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user