5

I have installed a talking clock app (named "Tell Me The Time") that say the current time every quarter hour. However I does not stay active and I have reopen it occasionally. At the same time, another similar app does not have this issue and remain active in the background. How to keep an app active (running) in the background (24/7)?

The issue is also more serious in using Torrent clients (they actually are useless in android).

2 Answers 2

4

It depends on how the app has been developed. Generally, android service needs to be running if you want the application to remain active in the background. But, if services are not used, then as soon as the activity disappears or destroys, behaviour is no longer observed.

4
  • 1
    An alarm would be better, and less draining to the battery. Commented May 6, 2015 at 18:32
  • As I mentioned in my answer, 'service' is the key factor. An alarm can be set on by using trigger actions. But, if not embedded in service, it will not work as soon as the user leaves the activity, Better to focus on using 'services'. This will ensure that the app will work even in the background.
    – Ali_Waris
    Commented May 7, 2015 at 5:14
  • So do you mean that it's impossible to keep an app running? Commented May 7, 2015 at 5:31
  • By keeping screen On continuously might serve the purpose, but its not practically feasible (battery constraints).
    – Ali_Waris
    Commented May 7, 2015 at 5:33
2

To my knowledge, you cannot properly ensure that without being the developer of the application (and even then there is no guarantee).

You need to know that the Android system is geared towards killing applications in the background as the device runs out of memory. The general rule-of-thumb is, that inactive apps are killed in favor of currently active ones if memory is low. I am sure as a developer, you can circumvent this to an extend with workarounds like trying to keep your app running in the background and bring it to the front regularly, restart it at fixed intervals or something similar. But as a user being given an arbitrary application, this sounds almost impossible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .