Hi, I have a change in the java file for this. SRC / Android / Notification.java
Added link to dlg.create ()
Declare it first.
private AlertDialog alertbox;
Then add the case when you send the βfireβ from javascript
else if (action.equals("dismiss")) { this.dismissAll(); }
Incremental method:
public void dismissAll(){ alertbox.dismiss(); }
Remember to add the same to notification.js in the www folder of the notification plugin
dismiss: function(message, completeCallback, title, buttonLabel) { var _title = (title || "Alert");//Doesnt Matter! var _buttonLabel = (buttonLabel || "OK");//Doesnt Matter! exec(completeCallback, null, "Notification", "dismiss", [message, _title, _buttonLabel]); },
Now add
alertbox = dlg.create(); alertbox.show();
instead
dlg.create(); dlg.show();
in all places.
And you can go by calling
navigator.notification.dismiss("",null,"");
This will reject all open alerts / confirmation / invitation.