Why is my Android app using a processor in the background?

I have been writing an Android app for several months now. It has not yet been released, but it is installed on my device.

Today I received a notification from the Battery Doctor application that my application consumes a lot of CPU, although I have not used it since yesterday.

So basically my application runs in the background, it should not do anything, but it uses a processor.

So, I opened TraceView and did some profiling in my application when it was in the background (I did not interact with my application during this profiling time at all), and this is what I got: http: //i.imgur. com / PYg6twX.png

I am very ignorant here. I do not see any functions from my actual code, so I donโ€™t even know where to start looking. And I really donโ€™t understand what these functions do in the screenshot or why they even appear there.

So, I have a few questions that I would really appreciate help:

  • Are my profiling results expected and OK? Or should these functions not be displayed if I am not interacting with my application?
  • If these functions should not be displayed, can anyone guess what might be wrong in my application? Could it be the reason?

Thanks a lot!

+5
source share

Source: https://habr.com/ru/post/1208928/


All Articles