|
@@ -37,6 +37,7 @@ import org.json.JSONObject;
|
|
|
import java.lang.reflect.Method;
|
|
import java.lang.reflect.Method;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
+import java.lang.Exception;
|
|
|
|
|
|
|
|
import de.appplant.cordova.plugin.notification.Manager;
|
|
import de.appplant.cordova.plugin.notification.Manager;
|
|
|
import de.appplant.cordova.plugin.notification.Notification;
|
|
import de.appplant.cordova.plugin.notification.Notification;
|
|
@@ -213,10 +214,18 @@ public class LocalNotification extends CordovaPlugin {
|
|
|
for (int i = 0; i < notifications.length(); i++) {
|
|
for (int i = 0; i < notifications.length(); i++) {
|
|
|
JSONObject options = notifications.optJSONObject(i);
|
|
JSONObject options = notifications.optJSONObject(i);
|
|
|
|
|
|
|
|
- Notification notification =
|
|
|
|
|
- getNotificationMgr().schedule(options, TriggerReceiver.class);
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ Notification notification =
|
|
|
|
|
+ getNotificationMgr().schedule(options, TriggerReceiver.class);
|
|
|
|
|
|
|
|
- fireEvent("schedule", notification);
|
|
|
|
|
|
|
+ fireEvent("schedule", notification);
|
|
|
|
|
+ }
|
|
|
|
|
+ catch(Exception generic) {
|
|
|
|
|
+ //silently ignore the exception
|
|
|
|
|
+ //on some samsung devices there is a known bug where a 500 alarms limit can crash the app
|
|
|
|
|
+ //http://developer.samsung.com/forum/board/thread/view.do?boardName=General&messageId=280286&listLines=15&startId=zzzzz%7E&searchSubId=0000000001
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|