Thanks for your answer. So any app that needs to record while phone is in sleep needs have a service capability. I guess none of the similar apps have this then. Except 'Sensor Charts' which doesn't have so many options to get raw data.
But there are many apps that have these sensor monitoring features, like fitness tracking, step tracking, they somehow doesn't use battery as much and can run along with everything else without much drain, on some Huawei phones for example (Huawei health app).
I would guess sensor on average would drain like 4-5% per hour with screen off which is not that much, with screen on it would be 15-20%. For example linear acceleration on my phone consumes 0.900 mA - 0.9 mAh. If average battery is 3.8-4 V and 4000 mAh, the particular sensor could work for 4444 hours if there wouldn't be any other power consumers. Screen on consumes around ~300+mAh.
But there are many apps that have these sensor monitoring features, like fitness tracking, step tracking, they somehow doesn't use battery as much and can run along with everything else without much drain, on some Huawei phones for example (Huawei health app).
I would guess sensor on average would drain like 4-5% per hour with screen off which is not that much, with screen on it would be 15-20%. For example linear acceleration on my phone consumes 0.900 mA - 0.9 mAh. If average battery is 3.8-4 V and 4000 mAh, the particular sensor could work for 4444 hours if there wouldn't be any other power consumers. Screen on consumes around ~300+mAh.