Android Process States

            Processes host applications and applications are made up of components. Within an Android system, the current state of a process is defined by the highest-ranking active component within the application that it hosts.  

 
Foreground processes have highest priority & empty process have lowest priority. So android will kill empty processes first in order to free up resources. 

Foreground Process :

            At any one time, there are unlikely to be more than one or two foreground processes active and these are usually the last to be terminated by the system. A foreground process must meet one or more of the following criteria :
  • Hosts an activity with which the user is currently interacting.
  • Hosts a service connected to the activity with which the user is interacting.
  • Hosts a service that has indicated, via a call to startForeground(), that termination would be disruptive to the user experience.
  • Hosts a service executing either its onCreate(), onResume() or onStart() callbacks.
  • Hosts a broadcast receiver that is currently executing its onReceive() method.

Visible Process :

            A process containing an activity that is visible to the user but is not the activity with which the user is interacting is classified as a 'visible process'. This is typically the case when an activity in the  process is visible to the user but another activity, such as partial screen or dialog, is in the foreground.

Service Process :

            Processes that contain a service that has already been started and is currently executing.

Background Process :

            These processes contain one or more activities that are not currently visible to the user, and does not host a service. Android maintains a dynamic list of background processes, terminating processes in chronological order such that processes that were the least recently in the foreground are killed first. 

Empty Process :

            Empty processes no longer contain any active applications and are held in memory and ready to serve as hosts for newly launched applications.

Comments

  1. In a computing context, empty processes are essentially vacant containers in memory, devoid of active applications like mini militia mega mod apk

    ReplyDelete

Post a Comment

Popular posts from this blog

Android App Overview

Android Overview