Process processes in the 1:android
When an Android app starts, the system starts a process and a main thread to run the app.
The Android system will do its best to keep the process stable and secure.
However, in some special cases, the old process is always removed to reclaim memory for new or important processes.
When you want to reclaim memory, the system decides that those processes should be preserved and those processes should be killed.
Therefore, in Android process management, the priority level of the process is set. The priority level depends on the program running within the process and the state of the program.
So. When the system needs to reclaim memory, it kills the low-priority process, which is the strategy of the Android system.
2: Five priority of the process
1:foreground Process For example: the user is working on the interface.
2:visible Process For example: a user switches from one process to another, the program is replaced, but recoverable. Example: When reading an ebook, the phone came in and the phone broke. e-book recovery.
3:service Process For example: while playing music, watching e-books. The service background of the music is executed.
4:background Process Timing Detection Update
5:empty Process Cache Processes
Note: The important level of the process may change at any time during operation.
Android Learning: Process and priority