我写一个提醒的应用程序,显然它需要闹钟功能。像重复上周日,周一,周五功能播放录制的音频报警,玩文字简报会是不错的。相反,重新发明轮子的,这将是方便有我的应用程序调用提供此功能的活动。
I am writing a reminder app and obviously it needs alarm clock functionality. Features like "repeat on sun, mon, fri", play recorded audio as alarm, play text as briefing would be nice to have. Instead of reinventing the wheel, it would be convenient to have my app call the activity that provides this functionality.
如果我想设置一个基本的闹钟,我会简单地传递在毫秒设置()在AlarmManager了Android的API中。对于如上述更复杂的功能,它不是可作为API的一部分。我不能对一个虚构的第三方提供商运行或测试。
If I wanted to set a basic alarm, I would simply pass in the millisec to set() in AlarmManager in the android API. For more complex functionality as described above, it is not available as part of the API. I cannot run or test against an imaginary 3rd party provider.
然而,在AlarmClock的机器人的确有这些功能,但不幸的是,简单地用常量的空类 developer.android/reference/android/provider/AlarmClock.html
However, AlarmClock in android does have these features but unfortunately is simply an empty class with constants developer.android/reference/android/provider/AlarmClock.html
DeskClock中源$ C $ c是这里android.googlesource/platform/packages/apps/DeskClock/+/master/src/com/android/deskclock/但它不是在API调用成
DeskClock source code is here android.googlesource/platform/packages/apps/DeskClock/+/master/src/com/android/deskclock/ but it is not in the API to call into.
另外,导入作为Android项目到Eclipse中给出了100的编译错误
Also, importing as an android project into Eclipse gives over 100 compile errors
Description Resource Path Location Type TimePickerDialog cannot be resolved AlarmUtils.java /DeskClock/src/com/android/deskclock line 61 Java Problem The method onPageSelected(int) of type DeskClock.TabsAdapter must override or implement a supertype method DeskClock.java /DeskClock/src/com/android/deskclock line 409 Java Problem The method showTimeEditDialog(FragmentManager, null, AlarmClockFragment, boolean) is undefined for the type AlarmUtils AlarmClockFragment.java /DeskClock/src/com/android/deskclock line 1677 Java Problem The method showTimeEditDialog(FragmentManager, Alarm, AlarmClockFragment, boolean) is undefined for the type AlarmUtils AlarmClockFragment.java /DeskClock/src/com/android/deskclock line 1055 Java Problem一个可以重复使用android系统中现有的闹钟功能?
Can one reuse existing alarm clock functionality in android?
推荐答案有没有一个系统应用程序,将用户显示时间选择,计算你的报警次数,让用户选择一个报警声,然后返回信息,以便你可以安排与AlarmManager报警。
There isn't a system app that will show the user a time chooser, calculate your alarm times, allow the user to choose an alarm sound and then return the info so you can just schedule the alarm with the AlarmManager.
就算这确实存在,你还是要存储和自行处理的事件。
Even if this did exist, you'll still have to store and process the events by yourself.
更多推荐
哪里是闹钟功能在android系统?
发布评论