How To Get An Estimated Amount Of Talktime,music/video Playback Time, Idletime That Could Be Possibly Done Based On The Current Level Of Battery Left
Solution 1:
Can't say for sure, but I highly doubt there would be any API for this.
I think the only workable approach is for you to collect data and try to estimate as close as possible. You can try to measure how much power each app / usage draws and also try to measure battery capacity. You'd have to tweak your values from time to time as batteries which are not new sometimes drop their voltage, etc so it's a moving target.
Solution 2:
I think this is impossible to do.
As @dain suggests you could tray and measure historical data and make a guesstimation based on that, but as all sorts of background processes (connection strength low means lot of searching, wifi or not, data in the background, new applications, you name it) have influence on this, so it's hard to be accurate based on the collected data.
You might be able to target specific processes (like calling, or using a specific app like a music player), and check how much power they use on average, and go from there.
What sollution you use, I think because of the difference in all the data you will get some sort of mean out of it that would probably not be correct for the current situation. You might get away with a "minimum" vs "maximum" time per activity?
Solution 3:
final Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_LAUNCHER); final ComponentName cn = new ComponentName("com.android.settings", "com.android.settings.fuelgauge.PowerUsageSummary"); intent.setComponent(cn); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity( intent);
this works for me
Post a Comment for "How To Get An Estimated Amount Of Talktime,music/video Playback Time, Idletime That Could Be Possibly Done Based On The Current Level Of Battery Left"