Commit 24d2593e by Sebastián Katzer

`cancel` is called with the notification id and not an object.

parent 59f204d6
...@@ -53,13 +53,10 @@ public class LocalNotification extends CordovaPlugin { ...@@ -53,13 +53,10 @@ public class LocalNotification extends CordovaPlugin {
} }
if (action.equalsIgnoreCase("cancel")) { if (action.equalsIgnoreCase("cancel")) {
JSONObject arguments = args.getJSONObject(0); String id = args.optString(0);
Activity activity = cordova.getActivity();
LocalNotificationOptions options = new LocalNotificationOptions(activity).parse(arguments);
String alarmId = options.getId();
cancel(alarmId); cancel(id);
unpersist(alarmId); unpersist(id);
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment