Cordova闹钟 [英] Cordova alarm clock

查看:1452
本文介绍了Cordova闹钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立了一个Cordova闹钟应用程序,它有一个计时器。一切正常,除非我现在想通知用户,当时钟是一个视觉和音频报警。

I have built a Cordova alarm clock app that has a timer. Everything works good except that I now want to inform the user when the clock is up with a visual and audio alarm.

我已经使用以下插件的本地通知: a href =https://github.com/katzer/cordova-plugin-local-notifications =nofollow> https://github.com/katzer/cordova-plugin-local-notifications

I have used the following plugin for local notifications: https://github.com/katzer/cordova-plugin-local-notifications

这似乎工作很好,除了它似乎无法工作,当手机屏幕关闭。

This seems to work good except that it doesn't seem to work when the phone screen is off.

任何想法的更好的方法这样做。我可能想要像Android中的AlarmManager,但到目前为止我还没有找到一个Cordova插件。

Any ideas of a better way of doing this. I probably want something like AlarmManager in Android but so far I haven't found a Cordova plugin for it.

推荐答案

@AAhad你的答案启发我的。
https://github.com/wnyc/cordova-plugin-wakeuptimer 是一款适用于iOS和Android设备的插件。

@AAhad your answer inspired mine. https://github.com/wnyc/cordova-plugin-wakeuptimer is a plugin that works for both iOS and Android devices.

这篇关于Cordova闹钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆