问题描述
我想设定一个正常的,Android的闹钟在我的应用程序 - 一个在默认的Android时钟应用程序。我只是想安排,将戒指让明天的说,早上8点我读过有关报警管理器的报警,但似乎触发一个事件,我只是希望它环。我是pretty的肯定有对于一个简单的解决办法,但我怎么也找不到它。我将AP precaite任何帮助!
I would like to set a normal, Android alarm clock in my app - the one in the default Android Clock application. I simply want to schedule a an alarm that will ring let's say tomorrow at 8 a.m. I've read about the Alarm Manager, but it seems to trigger an event, and I just want it to ring. I'm pretty sure there's an easy solution for that, but I couldn't find it. I'll apprecaite any help!
推荐答案
我结束了建设自己的铃声中的BroadcastReceiver,因为zapl建议(谢谢!)。问题是,我不能创建一个对话框,允许用户关闭该报警,但是我能够创建一个通知,这样做,作为类文档建议。
I ended up building my own ringer in the BroadcastReceiver, as zapl suggested (thanks!). Problem was, I couldn't create a dialog that would allow user to dismiss the alarm, however I was able to create a notification that does that, as the class documentation suggested.
这篇关于Android的 - 如何从我自己的应用程序设置系统闹钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!