Search code examples
androidperformancecalltelephony

What happens to a running app when there's a call?


Let's say I'm using an app which is both RAM and CPU intensive and I get a call which I'm bound to be on for say, a minute. In this case, I want to know what will be the fate of the application. Will it still continue its execution in the background and will its priority be changed?

Also, if at all the app uses higher amounts of RAM and CPU, is there any chance that the app will be shutdown by the android OS?

Please share any resources and documentation that discusses this subject. Thanks in advance. :)


Solution

  • Will it still continue its execution in the background

    For at least a few milliseconds, yes. Regardless of how an application moves to the background, once in the background, its process is eligible to be terminated, to free up RAM for other apps. When that occurs depends upon a lot of variables -- it could be milliseconds, it could be hours.

    and will its priority be changed?

    Background applications' processes run in a class that helps limit their CPU utilization.

    Also, if at all the app uses higher amounts of RAM and CPU, is there any chance that the app will be shutdown by the android OS?

    Regardless of amounts of RAM and CPU, the app's process may be terminated by Android at any point when it is in the background.