Is it possible to use the com.android.alarmclock
so that I can use it to kick off alarm features in my application? If it is how can i do it?
问问题
464 次
3 回答
2
从 API 级别 9 开始,您可以通过创建如下意图来设置闹钟:
Intent i = new Intent(AlarmClock.ACTION_SET_ALARM);
i.putExtra(AlarmClock.EXTRA_MESSAGE, "New Alarm");
i.putExtra(AlarmClock.EXTRA_HOUR, hours);
i.putExtra(AlarmClock.EXTRA_MINUTES, mins);
startActivity(i);
于 2011-04-07T00:50:18.847 回答
1
The service you need is the AlarmManager.
于 2010-04-14T09:21:22.083 回答
0
不,AlarmManager 不会触发警报!
于 2011-02-20T03:24:56.603 回答