开发者

Auto change wallpaper : what is the best approach

I'm programming a Live wallpaper displaying a simple image that I want change every 5 minutes or 5 hours. I've too approach : - make a thread in my engine changing wallpaper each x min/hours - call an Intent using an AlarmManager calling my engine to ch开发者_开发问答ange the current wallpaper

For you what's the best way (to save battery for example) ?


Personally, I would go with simplicity: use a handler with a runnable that reschedules itself with postDelayed() (as in the Cube example in the SDK). Battery drain is no concern here: wallpapers kill battery with complex animations at a rapid frame rate; all else is peanuts.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜