How to calculate sensor power consumption in Android

后端 未结 1 1299
忘掉有多难
忘掉有多难 2020-12-10 06:15

getPower() returns the power in mA used by a sensor while in use:

Now, I need to calculate how much battery is used by the registration of the sensor.

Does h

相关标签:
1条回答
  • 2020-12-10 06:45

    Something quite related has been discussed in Google groups not too long ago. You can find the full thread here for reference.

    A small excerpt from the last reply in that thread, which should answer your question more or less:

    (...) the battery capacity is always given in terms of mAH. (...) What matters is how long a battery can supply a given current at its rated voltage. 3800mAH means that it can supply 3800mA for 1 hour. Knowing this it makes sense now that the API is providing the current drain as a metric of power consumption. You can now calculate how much effect it will have on the battery life as a function of time.

    0 讨论(0)
提交回复
热议问题