Overview of Processes and Threads
Explore the concepts of processes and threads in Android, understand how the system creates and manages them, and learn best practices for using threads to perform background tasks efficiently while keeping the UI responsive.
We'll cover the following...
Introduction
In an operating system, a thread refers to the smallest processing task it performs. A process is an instance of a computer program that executes on one or multiple threads. When an Android application starts, the Android operating system creates a process for the application. Components in the application can choose to exist in this process or be a part of another process.
In this lesson, we’ll learn about processes and threads in Android and will understand what we should use and when.
Process
By default, all the components in an application exist as a part of the same process. However, it’s possible to use a different process for certain components by specifying the android:process attribute in the AndroidManifest.xml file.
The Android system decides which processes live by killing certain ...