-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ionic2 #18
Comments
+1 |
Hello,
on your ts file, add before class definition declare var window; and on you class you can do something like ...
public initializeAlarms(): void {
window.wakeuptimer.wakeup(
() => {
console.log("success callback")
},
() => {
console.log("error callback")
},
// a list of alarms to set
{
alarms : [
{
type : "onetime",
time : { hour : 14, minute : 30 },
extra : { message : "Lorem ipsum" },
message : "Alarm has expired!"
}
]
}
);
}
... hope i helped :) |
i tried your approach @EltonFaust , but its giving the following error. Unhandled promise rejection (rejection id: 1): CordovaError: Failed to fetch plugin https://github.com/wnyc/cordova-plugin-wakeuptimer.git via registry. can you help me regarding this?? Thanks in Advance :) |
Hello, which node/npm version are you using? the newer versions of npm requires a package.json file (npm 6 and newer i guess), something that old packages doesnt contains, that is probabily the reason of this error, i've forked this project and made some changes, if you like, you could opt to add mine instead,
|
Thank you @EltonFaust :) I will try your plugin |
Hi, how can I use this awesome plugin in the ionic 2 typescript application?
The text was updated successfully, but these errors were encountered: