Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Energy consumption on Android Studio Profiler

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.

Android Profiler

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.

enter image description here

Do you have any ideas where does this energy comes from and if it is related to our application code implementation?

like image 245
Philiz Avatar asked Oct 04 '18 12:10

Philiz


People also ask

How do I check power consumption on Android?

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.

What is the use of Profiler in Android Studio?

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.

What is energy Profiler?

The Energy Profiler Tool summarizes overall energy consumption to establish and visualize a preliminary baseline for energy reduction calculations.

How check battery consumption in android programmatically?

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.


1 Answers

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.

like image 175
Philiz Avatar answered Nov 04 '22 06:11

Philiz