wnyc / cordova-plugin-wakeuptimer

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

Function: Callback always returns unhandled type #29

Open Agencialinkmario opened 7 years ago

Agencialinkmario commented 7 years ago

I created an application using example code:

  Window.wakeuptimer.wakeup (successCallback,             ErrorCallback,             // the list of alarms to set             {                  Alarms: [{                      Type: 'onetime',                      Time: {hour: 14, minute: 30}                      Extra: {message: 'json containing app-specific information to be posted when alarm triggers'},                      Message: 'Alarm has expired!'                 }]             }          );        

Always returns me in Callback: unhandled type Being that I define the callback

                                    Var successCallback = function (result) {                                     If (result.type === 'wakeup') {                                           .....                                                                            } Else if (result.type === 'set') {                                          ....                                                                             } Else {                                          ....                                                                            }                                 };

Can someone help me understand the problem?

htsnet commented 6 years ago

When I try to set an alarm, I receive two messages error: