开发者

Timer, or Handler for capturing data at regular intervals in Android mobile apps?

I am writing an Android app that uses the accelerometer t开发者_如何学编程o record captured data at regular time intervals and store them into SQLite.

Is is better to use Timer (and TimerTask), or Handler for this task?


I would use a Handler in a TimerTask. Then I would use this task with a Timer.


I would personally use a Handler. How are you recording the data?


Handler is right way not timertask....You can directly use it for view invalidation not timer task

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜