wnyc / cordova-plugin-wakeuptimer Goto Github PK
View Code? Open in Web Editor NEWCordova plugin for a wakeup alarm clock
Cordova plugin for a wakeup alarm clock
I think this repo is not being maintained actively. Especially the example of SampleAlarm does not seem to do anything actually with the Alarm? It only logs a line when the device is ready (Cordova functionality). Has someone used this plugin with success?
Can this plugin actually be used when building via Phonegap Build?
If so, how?
The plugin doesn't allow start my app because the validation in onReset throw an exception, I get the values and found the problem was generated on getExtras().
I think, that the only change required is validate the extras and if there are no extras just not setAlarmsFromPrefs, am I right?
Hi, how can I use this awesome plugin in the ionic 2 typescript application?
How do I install this plugin ? It has been used in one of our oldest proect trying to migrate it to new version of cordova the command mentioned in this document is not working. Please advice me asap. Also does this plugin has updates ? Or contains uiwebview-api-deprecation ?
Thanks & Regards,
Pratiksha
in my index.html file, i put
<script type="text/javascript"> window.wakeuptimer.wakeup( successCallback, errorCallback, // a list of alarms to set { alarms : [{ type : 'onetime', time : { hour : 14, minute : 02 }, extra : { message : 'json containing app-specific information to be posted when alarm triggers' }, message : 'Alarm has expired!' }] } ); </script>but not working. can you provide some thorough tutorials?
I'm getting this error while installing plugin:
Plugin "org.nypr.cordova.wakeupplugin" already installed on android.
Plugin "org.nypr.cordova.wakeupplugin" already installed on browser.
Installing "org.nypr.cordova.wakeupplugin" for ios
Failed to install 'org.nypr.cordova.wakeupplugin':CordovaError: Could not find *-Info.plist file, or config.xml file.
at Object.parseProjectFile [as parse] (/Users/usr/-projects/-app/platforms/ios/cordova/lib/projectFile.js:51:15)
at Api.addPlugin (/Users/usr/-projects/-app/platforms/ios/cordova/Api.js:224:33)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:611:6)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:407:28
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
Error: Could not find *-Info.plist file, or config.xml file.
Hi - this question is Android only - I have this plugin working but I cannot work out how to load the app in the background via the alarm. I want to run occasional background content updates (similar to iOS Background Fetch) but do not want to disrupt the user if they are currently using another App.
Hello. I'm just starting with this plugin and I think it's working. I'd like to confirm the alarm has been set.
It'd be great if you showed screenshots where I could confirm my alarms have been successfully created.
Hi!
I want set some sound file from 'http://app-sounds.surge.sh/beep45.mp3'.
How i can do that?
Thanks!
Hey I've been having a really hard time getting this to work. Someone please clear some things for me.
Here is my code,
var successCallback = function(result) {
console.log('wakeup alarm detected-- '+ result);
};
var errorCallback = function(result) {
console.log('wakeup alarm detected-- '+ result);
};
var alarms = { type : 'snooze',
time : { seconds : 60 },
extra : { },
message : "Hello!!"
};
console.log("set Alarm");
window.wakeuptimer.snooze( successCallback, errorCallback, alarms);
Right now whenever I try to set the alarm, successCallback is called immediately where result is set to null.
Please help me out.
PS: I'm using it with Angualar
i would like to know if there any way to set alarm for a date
I have been using this plugin to create alarm based mp3 player, but I don't receive callback when alarm time elapses. I receive below warning message,
Plugin should use a background thread.
Hello,
tank you for this plugin.
i would like to now how to execute a specific function when alarm wakeup.
exemple: i would like to execute my function test when alarm wake up but it don't work.
can you help me please?
this ismy code:
function alarm(date, heure, min){
var successCallback = function(result) {
if (result.type==='wakeup') {
test();
//console.log('wakeup alarm detected--' + result.extra);
} else if(result.type==='set'){
alert('alarm initialiser');
//console.log('wakeup alarm set--' + result);
}else{
alert('unkown');
}
};
var errorCallback = function(result) {
if (result.type==='wakeup') {
console.log('wakeup alarm detected--' + result.extra);
} else if(result.type==='set'){
console.log('wakeup alarm set--' + result);
} else {
console.log('wakeup unhandled type (' + result.type + ')');
}
};
// //type : 'onetime',
window.wakeuptimer.wakeup(successCallback,
errorCallback,
{
alarms: [{
type: 'onetime',
time: {hour: heure, minute: min},
extra: { message: 'test'},
message: 'Alarm has expired!'
}]
}
);
}
function test(){
alert('it is time');
}
tank you
wakeup time not accurate?,I'm set 10:52,wakeup at 10:54. this is bug?
Hi,I need your help
i have version cordova: 7.0.1
Ionic v 1
when trying to install the plugin not install:
-> cordova plugin add https://github.com/wnyc/cordova-plugin-wakeuptimer.git
Error: Failed to fetch plugin https://github.com/wnyc/cordova-plugin-wakeuptimer.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963228 Error output:
npm ERR! addLocal Could not install C:\Users\germa\AppData\Local\Temp\npm-6268-f4f54423\git-cache-eb611dc2\ae06fc686e7111f593d1e7489034ba77736fd5f2
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "https://github.com/wnyc/cordova-plugin-wakeuptimer.git" "--save"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! syscall read
npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.
npm ERR! Please include the following file with any support request:
npm ERR! C:~~\node_modules\npm-debug.log
Hi, I got trouble when looking help from the alarm example.
https://github.com/wnyc/cordova-plugin-wakeuptimer/tree/master/examples/SimpleAlarmExample
I can't find any codes in the index.html nor index.js about this plugin. It seems just to be an auto-generated sample cordova project. So I can't get any hints from the demo on how to use the plugin.
My problem is, when I create an alarm, I get a result of "OK", but then the alarm never fires when it times up.
I've read all issues and spend a lot of time in googling. But could not get any help.
Could anyone point me a direction of using the plugin or show me a workable alarm example?
Thanks very much! ^_^
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?
I'm using this plugin to wake up an app that could be suspended or killed, to generate an alarm at a precise time (like an alarm clock). It works almost perfectly on my phone (only failed once) but noticed that lots of times it fails in another phone (both are from Samsung and have Android 7.0 installed, but the hardware is different - A5 vs S7). I added debug messages to the app and the problem seems to be that when the app was suspended or killed (for example by the Android power manager or manually), sometimes it wakes up a bit late - in the situations I've observed the app was reactivated more than one minute after the time configured in the alarmManager (and as the app validate that it is time to alarm if it is in the correct hour and minute, it doesn't alarm in that situation). I've already checked that this plugin uses the alarmManager.setExact method if the API level is higher than 19 and verified adding debug that it is really using the setExact method. What else could be the problem?
Best regards
Fernando
fail in submin plugin
Hello everyone,
I tried this plugin and everything is working fine except that the alarm doesn't work when phone is locked.
I want the alarm at utmost priority.
Any help is appreciated.
i was playing with the plugin on IOS and i was expecting that once the alarm time is reached, the app would open automatically if it was on the background, but apparently the system triggers a notification and the app only is brought to foreground if the user clicks the notification... Is this the expected behaviour or am i missing something? thanks in advance
How to cancel the alarm clock
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.