From 38e2ed5e9b6f29c00cca2129f2a21688113bbb3b Mon Sep 17 00:00:00 2001 From: shankari Date: Wed, 1 Apr 2020 09:24:58 -0700 Subject: [PATCH] Support new version of the local notification plugin (#21) * Support new version of the local notification plugin + bump up version number * Not sure how it compiled without this * Might as well remove whitespace changes --- plugin.xml | 2 +- src/android/TransitionNotificationReceiver.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin.xml b/plugin.xml index 508dcdd..bb3e112 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,7 +1,7 @@ + version="1.2.1"> TransitionNotification Transition notification. Specially good for trip start and trip end notifications diff --git a/src/android/TransitionNotificationReceiver.java b/src/android/TransitionNotificationReceiver.java index 705489b..15465d2 100644 --- a/src/android/TransitionNotificationReceiver.java +++ b/src/android/TransitionNotificationReceiver.java @@ -29,6 +29,8 @@ import de.appplant.cordova.plugin.localnotification.TriggerReceiver; import de.appplant.cordova.plugin.notification.Manager; +import de.appplant.cordova.plugin.notification.Request; +import de.appplant.cordova.plugin.notification.Options; /* * Importing dependencies from the logger plugin @@ -161,7 +163,7 @@ public void notifyEvent(Context context, String eventName, JSONObject autogenDat } Log.d(context, TAG, "generating notification for event "+eventName + " and id = " + currNotifyConfig.getLong(ID)); - Manager.getInstance(context).schedule(currNotifyConfig, TriggerReceiver.class); + Manager.getInstance(context).schedule(new Request(new Options(currNotifyConfig)), TriggerReceiver.class); } else { Log.d(context, TAG, "notification for event "+eventName+" and id = "+currNotifyConfig.getLong(ID) +" muted, skip");