mirror of
https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git
synced 2026-04-28 00:00:04 +08:00
#23 Notifications while app is suspended
This commit is contained in:
@@ -26,6 +26,11 @@ public class Toast extends CordovaPlugin {
|
||||
public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
|
||||
if (ACTION_SHOW_EVENT.equals(action)) {
|
||||
|
||||
if (webView.isPaused()) {
|
||||
// suppress while paused
|
||||
return true;
|
||||
}
|
||||
|
||||
final String message = args.getString(0);
|
||||
final String duration = args.getString(1);
|
||||
final String position = args.getString(2);
|
||||
|
||||
Reference in New Issue
Block a user