title: How to calculate remaining time of android phone battery?
body: <p>I am developing battery health app on Android Studio.
  I want to know how to calculate remaining time by playing music or video, browsing website, or standby.
  I have seen many android apps like this but can not see the source code.
  I want to see the sample code for calculating remaining time for playing music or video and so on. If you have developed android battery healthy app before, please share your knowledge.</p>