在Android的重复报警 [英] Repeating Alarm in Android

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

问题描述

什么是落实在我的Andr​​oid应用程序重复报警的最佳方式?每个用户选择一个特定的时间,我想通知他们时,这时候就每天基地接近。我所遇到的,但我想知道是否这是最好的办法吗?

What is the best way to implement repeating alarm in my android application? Every user selects a specific time and I want to notify them when this time approaches on daily bases. I have come across this, but I am wondering whether this is the best way?

推荐答案

报警经理应该满足您的需求。目前,除了也许有一个服务器的ping你的客户没有任何的更好的方式。

The alarm manager should meet your needs. There is no better way except for maybe having a server ping your client.

由于Android真的不喜欢的东西,重复上predictable间隔,因为最近的版本中,不要让你重复一个确切的固定间隔,无论如何,你需要安排的时候报警,你想要的,然后当火警,安排在您希望的时间,第二天一个新的。

Since android really doesn't like things that repeat on a predictable interval, and since recent versions don't let you repeat on an exact fixed interval anyway, you'll need to schedule the alarm at the time you want, and then when that alarm fires, schedule a new one for the next day at the time you want.

这篇关于在Android的重复报警的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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