开发者

Android: Alarm app best practices?

I'm writing a simple alarm clock app to introduce myself further to android development.

I've looked at the android tutorials for alarms; for starting services and activities. In my case I want to set an alarm time, then start something that runs for say 1/2 hour after the alarm is fired.

During this 1/2 hour there will be background tasks happening but also on-screen information being displayed.

I am mostly curious as to what is best practice in this case. Should I run the background tasks as a service and the foreground as an activity? As the on screen activity is running at the s开发者_Python百科ame time as the background tasks would it be better just to run it all in an activity?

Cheers!


I'd say the best way is the way Google does it. Take a look.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜