01-09-2020, 04:49 PM
(01-09-2020, 04:02 PM)user123 Wrote: 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).
Good observation. But the step counter capability is actually proided by Android as a separate sensor. This means that the app does not have to monitor and analyze the accelerometer itself, but instead it only needs to wake once in a while (or maybe not at all until the user turns on the screen again) and just receive the latest count from the system. (See https://developer.android.com/guide/topi...tepcounter). The counting itself is done by Android and on most modern phones it uses a special coprocessor for this (this was one of the novelties of the iPhone 5s if I remember correctly...).
(01-09-2020, 04:02 PM)user123 Wrote: 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.
I am not worried about the drain from the sensor it self but from the CPU not entering deep sleep states. The power consumption of the CPU will exceed that from the sensor by far and entering deep sleep states is essential for battery life.