Should I use AlarmManager or Handler?

前端 未结 4 1824
我在风中等你
我在风中等你 2020-12-14 20:27

I\'m writing an app that constantly polls the device\'s sensors and every so often should write down some statistics to a file. This could be as fast as once a second or as

4条回答
  •  失恋的感觉
    2020-12-14 21:02

    This should help you discriminate between Handler and AlarmManager. [source]

    Though it is agreed these mostly work for API 23. It's a new release.

提交回复
热议问题