action_battery_low---"); else if (Action.equalsignorecase (Intent.action_battery_okay)) {//indicates that the current battery has been restored from low battery to normal System.out. println ("
Batterychangedreceiver action_battery_okay---"); }
}
}
}
Get apk and version information
private int Getvercode (context context) {
int vercode =-1;
try {
Vercode = Context.getpackagemanager (). Getpacka
Android Battery status monitoring
If you want to monitor changes in the battery status, you need to dynamically register: android. intent. action. BATTERY_CHANGED: After receiving the Action, you can obtain the information you need based on the corresponding Key. For more information, see the BatteryChangedReceiver cla
1. To obtain the battery information of the Android device, register a BroadCastReceiver whose Action is Intent. ACTION_BATTERY_CHANGED.
2. In the BroadcastReceiver onReceive () event, the received Intent. ACTION_BATTERY_CHANGED includes the following information:
"Present" (boolean )..."Level" (int )... Remaining battery capacity"Scale" (int )... Maximum
The example in this article describes how Android looks at the battery charge. Share to everyone for your reference, specific as follows:
The procedure is as follows:
Import android.app.Activity;
Import Android.app.Dialog;
Import Android.content.BroadcastReceiver;
Import Android.content.Context;
Import android.content.Intent;
Import Android.content.IntentFilter;
Import Android.graphics.Color;
Import A
Chapter: Automation Fundamentals-Battery life Automation test NetEase Cloud Classroom:http://study.163.com/course/courseLearn.htm?courseId=712011#/learn/video?lessonId=878098courseId=712011http://study.163.com/course/courseLearn.htm?courseId=712011#/learn/video?lessonId=878099courseId=712011Main content and notes:The factors and theories that affect mobile phone power:Here is a table: today's mainstream mobile phone display technology, model and power
Android Developers can use the broadcastreceiver mechanism to obtain the action_battery_changed intent of the battery change, and then obtain the battery status of the current Android device.Procedure:1. Create an intentfilter that listens to the action_battery_changed event.2. Create a broadcastreceiver object that ca
Battery usage has always been a top concern for smartphone enthusiasts.
As more and more applications increase, people need to charge at least twice a day. This also causes the battery problem to be thrown to the Cusp again. To this end, the android team provided a series of "courses" for its developers to teach some smart phone power-saving tips, such as how to
Http://hukai.me/android-performance-battery/can refer to this article first1$ adb shell Dumpsys batterystats > Xxx.txt//Get power consumption information for the entire device $ adb shell Dumpsys batterystats > COM.PACKAGE.N Ame > Xxx.txt//Get battery consumption information for the specified app2 Installing Python setting environment variables3python historian.
AlarmmanagerElapsed_timeElapsed_time_wakeupRtcRtc_wakeupexpressed using Elapsed_time and RTC. Assume that the device does not wake up and then wait for the device to wake up to run the corresponding actionSo try to use both of these parametersIn addition, the use of Alarmmanager setinexactrepeating is also able to achieve the purpose of power saving, the main difference is how the system to arrange reminders, Android can adjust the actual trigger eve
Recently, I was wondering how to compile an Android battery plug-in on the desktop. First, this App has practical value, and second, the compilation workload should not be very large, you don't have to spend too much time learning the development method of widgets, so you can do it three times. So you can pause the learning of Game Development and compile a Widget first.
After finding and combining multi
Recent whim, want to make up an Android battery plugin on the desktop, one is this app does have its practical value, the second is to build up the amount of work should not be very large, do not spend too long, three and can learn the development of the widget under the three-way, so, Pause the game development of learning, to make a widget first.
After the search and integration of multiple data finall
I recently bought HTC, and the operating system is Android. I kept playing with it. During this period, I restored the factory settings twice,
Modify the battery icon at http://uot.dakra.lt/kitchen /.
When the battery is fully powered, the icon is a little biased. The number 100% is connected with the border,
You can modify it manually,
It looks good!
The Android underlying layer provides excellent control capabilities for both software and hardware systems, and the interface definition is very clear. We can easily implement the desired control, as a result, a quick setup function is available in the project recently, which requires one-click wifi shutdown, mobile network shutdown, battery setting, and flight mode, one-click Application Opening (the appl
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.