开发者

Timer with multiple things to do

I am making an android app which reminds people via notifications of events they have to do over the course of a day. The way I currently do this is have each 开发者_StackOverflow社区event on a seperate timer using the Timer class. However, I don't think this is great way of doing things. Is there any way maybe to have just one timer which will trigger an event at each time interval I pass in? Or is there any other way of scheduling a notification?


You should look at AlarmManager : http://developer.android.com/reference/android/app/AlarmManager.html

This way events can be notified even if your app is not in focus.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜