How can I implement idle timeout in android?

How can we implement app battery quota for android?

  • In every mobile OS there is energy resource conflict by multiple background apps, which lead to user complaints as user find the phone shut down when trying to make a call. How can we implement a battery quota system for background apps in android, such that an background app is automatically "frozen" when it used up its battery quota, until a new cycle of battery quota is assigned so it receives additional quota?

  • Answer:

    Very fast thinking out of my head, first thing I'd do (instead of re-inventing the wheel) is to take a look at the Android API in what is related to battery status reporting.   I am assuming this would be the core for an app that kind of monitors battery behavior as a function of apps usage and based on specific settings either general or, per app, shutdown the "offending" app. That is pretty much the very first thoughts that come to my mind. Sounds  like an interesting idea, nevertheless.  I just wonder how practical is it, because this very app itself,  could drain a lot of energy... and thus become a huge part of the same problem it is trying to addresss.... Then a meta-app exactly like this would be needed....ad infinitum... ;)   Hope this gives you a first pointer.  Keep me posted on how the idea goes....

Felipe Barousse at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.