使用意图ACTION_SET_ALARM允许应用程序设置一个UNIQUE报警 [英] Using intent ACTION_SET_ALARM to allow application to set a UNIQUE alarm

查看:194
本文介绍了使用意图ACTION_SET_ALARM允许应用程序设置一个UNIQUE报警的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图写一个基于交替算法确定一些preSET值自动设置了Android默认的闹钟应用程序。

I am attempting to write an application that automatically sets the Android default alarm based on some preset values determined by an alternate algorithm.

报警设置工作正常使用ACTION_SET_ALARM意图,但是我每次运行应用程序,它会设置一个新的警报。我不知道是否有什么办法,而不是有一个独特的闹钟设置为每天更新活动设置报警(这样不会有数百个新的报警在Android应用程序报警)的时间。

The alarm setting works fine using the ACTION_SET_ALARM intent, however every time I run the app, it sets a NEW alarm. I'm wondering if there is any way to instead have one unique alarm set to update every time the activity sets the alarm (so that there are not hundreds of new alarms in the Android alarm application).

我公司将提供code摘编如果有必要,但似乎这个问题可以在没有具体的例子来回答。注:我没有使用旨在用于通知某些事件的其他活动的Andr​​oid报警系统,而是实际的Andr​​oid报警用户将利用早上醒来

I will provide code excerpts if necessary, however it seems that this question can be answered without specific examples. NOTE: I am not using the Android alarm system that is intended for informing other activities of certain events, but rather the actual Android alarm that users will utilize to wake up in the morning.

感谢您事先的任何帮助!

Thank you in advance for any assistance!

推荐答案

原来,这实际上是不可能给我的问题的范围。相反,我曾与制造商特定闹钟的列表,以工作(<一个href=\"http://stackoverflow.com/questions/4115649/listing-of-manufacturers-clock-alarm-package-and-class-name-please-add\">here)并专门处理每个案例。

It turns out that this is actually not possible given the scope of my problem. Instead, I had to work with a list of manufacturer specific alarm clocks (here) and handle each case specifically.

在用户仍在使用开源报警的情况下,我不得不删除ACTION_SET_ALARM意图,因为目前的冗余报警问题没有解决方法。用户必须手动删除每个报警。

In the case where the user is still going to use the open source alarm, I had to remove the ACTION_SET_ALARM intent as there is currently no workaround for the redundant alarms issue. The user would have to manually delete each alarm.

这篇关于使用意图ACTION_SET_ALARM允许应用程序设置一个UNIQUE报警的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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