wnyc / cordova-plugin-wakeuptimer

Cordova plugin for a wakeup alarm clock
90 stars 111 forks source link

how to set alarm date and time #16

Open rashnk opened 8 years ago

rashnk commented 8 years ago

i would like to know if there any way to set alarm for a date

Kobzol commented 8 years ago

If you look at the source code here: https://github.com/wnyc/cordova-plugin-wakeuptimer/blob/master/src/android/WakeupPlugin.java#L161 you can see that it accepts a parameter named daylist that should contain an array of days in week when the alarm should be set (you can see the string constant at the top of the file, "sunday", "monday" etc.).

seineken commented 8 years ago

Could you please post an example how to do it.

Kobzol commented 8 years ago
alarms : [{
            type : 'daylist',
            days : ["sunday", "monday"]
       }] 
natanraj commented 7 years ago

But can this plugin work for a particular date ? (Days are Sunday etc), but date is 9th Oct 2016 etc Basically i want to set up a reminder (as alarm for a particular Date)

Kobzol commented 7 years ago

I surveyed the source code and I would say that it's not possible, but maybe I'm wrong.

htsnet commented 6 years ago

Is this plugin working for you? In all my tests I always receive a message "error: invalid json " Do you know why?