In Android Studio 3.2 there is a Profiler that let you know what is the energy consumption of your application.
We suspect a slow energy leak due to our application that reduces the battery autonomy of several hours.
With the Profiler we can say that there are no CPU, MEMORY and NETWORK activity while the application is in background and the phone in sleep mode (standby). But we can notice on the graph around every 5 seconds a very light ENERGY consumption.
I would like to know if this light ENERGY consumption (in purple on the graph) is normal or if it is something to worry about.
I tried to select part of the graph to see events related to this energy bar but it says "No system events for the selected range or filter" like on this print screen below.
Do you have any ideas where does this energy comes from and if it is related to our application code implementation?
Checking Power Consumption To check the power consumption on your device, find the Android Settings menu and look for Battery. You will see a graph of power usage broken down by apps and phone functions.
The Android Profiler in Android Studio 3.0 and higher replaces the Android Monitor tools. The Android Profiler tools provide real-time data to help you to understand how your app uses CPU, memory, network, and battery resources.
The Energy Profiler Tool summarizes overall energy consumption to establish and visualize a preliminary baseline for energy reduction calculations.
Go to the activity_main. xml file, which represents the UI of the project. Add a Button, so whenever the user will click on the Button a Toast message with battery percentage will be popped up on the screen.
I actually did a test with a new empty project, only 1 activity doing nothing. The profiler is showing the same small and frequent energy pulse. So that's something that doesn't come from the implementation of the application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With