Android Application Programming and Energy Efficiency

ATM, I am looking at open source / closed source applications for Android> to identify specific problems (code blocks, code templates) that raise an energy problem, since my interests and part of the research.

For example, a code that

  • turning on GPS longer than necessary , or
  • refreshing display unnecessarily.

So,

  • Are there any suggestions on how I can look for these problems and possible fixes?

  • can any professional Android programmer suggest some common methods that save energy with sample code?

Thanks in advance, sorry for asking a little open-ended question.

+1
source share
1 answer

In fact, Android developers have written a great guide to Designing for Performance so that you can save battery life by not running the processor hack all the time and not much equipment. But the main point is to minimize:

  • CPU load time (do not force it to sit at 100% use and use the Alarm Manager if that’s all you need)
  • Hardware (do not sit there while showing GPS)
  • Using the screen (If you do not need to turn on the screen, or it may go black and then allow it, do not display a bright white background constantly)

In principle, any use will lead to battery leakage at all, and the battery will consume energy, regardless of the fact that the energy of the devices has been used up, due to which the battery is running out, so you should minimize it.

+3
source

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


All Articles