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
This should help you discriminate between Handler and AlarmManager. [source]
Handler
AlarmManager
Though it is agreed these mostly work for API 23. It's a new release.