Android的报警经理间隔长 [英] android alarm manager long interval

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

问题描述

我有,根据用户的preferences间隔的变化得到通知的形式报警管理对象的服务工作的例子,当时间间隔为5-10-20-30分钟,但是当这工作正常我安排一小时是从来没有通知我的服务报警,有关于任何已知的bug?不应该报警通知我的服务?

I have a working example of a service that gets notified form an alarm manager object, the interval changes according to the user's preferences, this works fine when the interval is 5-10-20-30 minutes but when I schedule an alarm for one hour my service is never notified,is there any known bug about that? shouldn't the alarm notifies my service?

推荐答案

检查 AlarmManager 文档,有一个 INTERVAL_HOUR 不变,这将是更好的在这种情况下使用。

Check the AlarmManager documentation, there is a INTERVAL_HOUR constant that would be better to use in this case.

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

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