forked from github/Toast-PhoneGap-Plugin
#23 Notifications while app is suspended
This commit is contained in:
parent
23e5029f89
commit
cd65647841
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user