Commit 54575439 authored by Sebastián Katzer's avatar Sebastián Katzer
Browse files

Calling `cancel` on Android with an invalid String as ID does not throw an error anymore.

parent 4fc99882
Loading
Loading
Loading
Loading
+3 −0
Changes for src/android/LocalNotification.java: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -138,7 +138,10 @@ public class LocalNotification extends CordovaPlugin {
        NotificationManager nc = getNotificationManager();

        am.cancel(pi);

        try {
            nc.cancel(Integer.parseInt(notificationId));
        } catch (Exception e) {}
    }

    /**