Q:

intend service or service for continuously logging sensor data(step counter)?

The target is a pedometer using 4.4 step counter api.
As the api return steps counted since LAST BOOT,
My idea is to save those data into database periodically or onSensorChanged().
(P.s. I don't know if step counter supports onSensorChanged())

Using either method requires a service running whenever the device is on after installation of the app to save sensor data to database.
I wonder which service should I use?
And is my logic to log sensor data appropriate?

Appreciate any help

A:

Service.  An IntentService is something you run to do a particular time bound job and which will eventually finish and end.  Usually (although not always) you'll be calling it multiple times in response to some event(s).  For example, you may use an intent service to manage syncing assets to a file system, with the intent service called each time you wish to sync.  If you want to do something continually over a long period of time, you just want a Service.

