开发者

Using android alarmclock

Is it possible to use the com.android.alarmclock so that I can use it to ki开发者_如何学Cck off alarm features in my application? If it is how can i do it?


Since API level 9 you can set the AlarmClock by creating an intent like the following:

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);


The service you need is the AlarmManager.


No the AlarmManager is not going to set off a Alarm!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜