Improving App Performance with Threading

Learn how to use threads in Android for improving the app's performance.

Introduction

Any application code is executed on either the main or worker threads. By default, all the application code is executed on the main thread. If this thread contains long-running tasks, it might block the thread, resulting in an unresponsive app experience.

In this lesson, we’ll learn how to use different threads effectively to improve the app's performance.

Using thread priority

To recap, we can create a new thread using the following code snippet:

Get hands-on with 1200+ tech skills courses.