Services

A Service is an application component that can perform long-running operations in the background and does not provide a user interface. Another application component can start a service and it will continue to run in the background even if the user switches to another application. Additionally, a component can bind to a service to interact […]

Read More

IntentService

The IntentService class provides a straightforward structure for running an operation on a single background thread. This allows it to handle long-running operations without affecting your user interface’s responsiveness. Also, an IntentService isn’t affected by most user interface lifecycle events, so it continues to run in circumstances that would shut down anAsyncTask An IntentService has […]

Read More

AsyncTask

The AsyncTask Android class lets us sort of bind background tasks to the UI thread. So using this class, you can perform background operations and then publish the results to the UI thread that updates the UI components. This way you won’t have to deal with threads, handlers, runnables, etc. directly yourself. It’s sort of […]

Read More

Android threading…why to use…what to use…how to use.

Service Thread IntentService AsyncTask When to use ? Task with no UI, but shouldn’t be too long. Use threads within service for long tasks. – Long task in general. – For tasks in parallel use Multiple threads (traditional mechanisms) – Long task usually with no communication to main thread. (Update)– If communication is required, can use main […]

Read More