Free Android app covering all aspects of addiction, including prevention and treatment

AsyncTasks do it in the background

The golden thread

asyncTask tutorial icon

All Android components (like activities and services) start on the main thread. This is the thread that the user interacts with.

You need to keep this thread clear so that the app does not hang. It’s a good idea to put all time-consuming processes on a separate thread.

Put file operations, network lookups, database interaction, etc. on a background thread.