فهرست منبع

Fixed the schedule event

In Android the ‘schedule’ event was not raised after scheduling one or
more tasks.
Michel Reij 10 سال پیش
والد
کامیت
58908c20c2
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      src/android/LocalNotification.java

+ 4 - 1
src/android/LocalNotification.java

@@ -180,7 +180,10 @@ public class LocalNotification extends CordovaPlugin {
     	for (int i = 0; i < notifications.length(); i++) {
     		JSONObject options = notifications.optJSONObject(i);
 
-            getNotificationMgr().schedule(options, TriggerReceiver.class);
+            Notification notification =
+                    getNotificationMgr().schedule(options, TriggerReceiver.class);
+            
+            fireEvent("schedule", notification);
     	}
     }