power-management

How to get information about android battery usage by application

本小妞迷上赌 提交于 2019-11-27 04:22:43
How can I get battery usage per application in Android. I need to know % of battery spent by application. Is it possible using SDK? What I need is the information that's available on an Android device under "Settings>About phone>Battery use", but for specific applications Thanks The project isn't complete by any stretch of the imagination, but I created an application framework (kinda...that was the goal, it's not there yet) to do just this. Check out http://syspower.googlecode.com . You won't be able to get the percentage by application unless you calculate the usage for all applications but

Windows - CPU power management APIs

落花浮王杯 提交于 2019-11-27 03:30:57
问题 What APIs are provided by Windows for CPU power management (I'm interested in CPU frequency scaling, setting min and max CPU frequency - similar to what you can do in Control Panel in power plans, but in a programmatic way). I'm also interested in .Net APIs. (It is not something I intend to use in a production environment, but rather as a proof of concept for some dynamic power management algorithms) 回答1: The C++ Power Management APIs: http://msdn.microsoft.com/en-us/library/aa373170.aspx

Detect Changing Battery state at every percentage in android

情到浓时终转凉″ 提交于 2019-11-27 02:56:29
问题 i want to detect battery change at every percentage. I am able to detect battery level once with broadcast receiver. But its not updating value automatically when % change from 66 to 67. Here is my code. private void batteryLevel() { BroadcastReceiver batteryLevelReceiver = new BroadcastReceiver() { public void onReceive(Context context, Intent intent) { context.unregisterReceiver(this); Log.i("Battery CHANGED******",":: IN RECEIVER"); int rawlevel = intent.getIntExtra("level", -1); int scale

Android Battery in SDK

半世苍凉 提交于 2019-11-26 17:13:47
Is there a way to get battery information from the Android SDK? Such as battery life remaining and so on? I cannot find it through the docs. You can register an Intent receiver to receive the broadcast for ACTION_BATTERY_CHANGED: http://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_CHANGED . The docs say that the broadcast is sticky, so you'll be able to grab it even after the moment the battery state change occurs. Here is a quick example that will get you the amount of battery used, the battery voltage, and its temperature. Paste the following code into an

How to get information about android battery usage by application

点点圈 提交于 2019-11-26 12:43:57
问题 How can I get battery usage per application in Android. I need to know % of battery spent by application. Is it possible using SDK? What I need is the information that\'s available on an Android device under \"Settings>About phone>Battery use\", but for specific applications Thanks 回答1: The project isn't complete by any stretch of the imagination, but I created an application framework (kinda...that was the goal, it's not there yet) to do just this. Check out http://syspower.googlecode.com.

Android Battery in SDK

北城余情 提交于 2019-11-26 08:54:07
问题 Is there a way to get battery information from the Android SDK? Such as battery life remaining and so on? I cannot find it through the docs. 回答1: You can register an Intent receiver to receive the broadcast for ACTION_BATTERY_CHANGED: http://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_CHANGED. The docs say that the broadcast is sticky, so you'll be able to grab it even after the moment the battery state change occurs. 回答2: Here is a quick example that will get