Open simongcx opened 9 years ago
AlarmOptions.parseOptions expects the JSONObject to have a "date" field, at string in the format month/day/year/hour/min. As far as I can see, the data that is put into the SharedPreferences is exactly the JSON object passed from the javascript interface file, and the documentation does not suggest a "date" field is required (the time of the notification is communicated in the "seconds" property").
Where is the "date" property set?
Has the AlarmRestoreOnBoot actually been sucessfully tested?
I am encountering problems with the AlarmRestoreOnBoot functionality on Android 4.4.4 with a Cordova 3.5.1 app built in Intel XDK using release 2.1.0 of this plugin.
To test, I am creating 100 notifications 1 minute apart, then restarting the phone. I get not subsequent notifications, but the phone does a lot of vibrating just after boot, which I think is due to processing the notifications that don't have a time set.
In adb I have simulated a reboot with:
With adb logcat -s LocalNotification I get approximately 100 of the following message:
Followed by approximately 100 of the following series of three messages:
As there is no ID, title, ticker, etc, I hypothesise that the addAlarm called from AlarmRestoreOnBoot is where the problem is occuring (not in the AlarmReceiver class).
However, a commonality between this issue and the one I have encountered with cancelAll() #29 , may suggest an issue with the getSharedPreferences code.