Commit ea3b9d6a by Sebastián Katzer

Added interval support

parent 98d4d59f
...@@ -33,10 +33,21 @@ public class LocalNotificationOptions { ...@@ -33,10 +33,21 @@ public class LocalNotificationOptions {
* Parse options passed from javascript part of this plugin. * Parse options passed from javascript part of this plugin.
*/ */
LocalNotificationOptions (JSONObject options) { LocalNotificationOptions (JSONObject options) {
String repeat = options.optString("repeat");
this.options = options; this.options = options;
date = options.optLong("date") * 1000; date = options.optLong("date") * 1000;
//interval = options.optString("repeat");
id = options.optString("id"); id = options.optString("id");
if (repeat.equalsIgnoreCase("daily")) {
interval = 86400000;
} else if (repeat.equalsIgnoreCase("weekly")) {
interval = 604800000;
} else if (repeat.equalsIgnoreCase("monthly")) {
interval = 2678400000L; // 31 days
} else if (repeat.equalsIgnoreCase("yearly")) {
interval = 31536000000L;
}
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment