Logo
Pattern

Discover published sets by community

Explore tens of thousands of sets crafted by our community.

Android Services & Background Tasks

20

Flashcards

0/20

Still learning
StarStarStarStar

Started Service

StarStarStarStar

Purpose: To perform a task without a direct user interface feedback but not instantly noticeable by the user. Example: Downloading a large file in the background.

StarStarStarStar

ViewModel

StarStarStarStar

Purpose: To manage UI-related data in a lifecycle-conscious way. Example: Retaining UI data after configuration changes like rotations.

StarStarStarStar

Foreground Service

StarStarStarStar

Purpose: To perform a task that is noticeable to the user. Example: A music player playing music while the user is in a different app.

StarStarStarStar

JobScheduler

StarStarStarStar

Purpose: To schedule jobs when certain conditions are met. Example: Uploading logs when the device is charging and connected to Wi-Fi.

StarStarStarStar

WorkManager

StarStarStarStar

Purpose: To schedule and execute deferrable background tasks that need a guaranteed execution. Example: Daily backup of app data to the cloud.

StarStarStarStar

LiveData

StarStarStarStar

Purpose: To observe changes in data within a view model. Example: Automatically updating the UI when the data source is changed.

StarStarStarStar

Services vs Threads

StarStarStarStar

Purpose: Knowing the difference helps in choosing the right approach for a task. Services are components that handle tasks without UI, while threads handle operations outside the main thread.

StarStarStarStar

AlarmManager

StarStarStarStar

Purpose: To trigger operations even if the app isn't running at predefined times. Example: An app that sends a notification reminder every morning.

StarStarStarStar

Handler

StarStarStarStar

Purpose: To handle and enqueue action or messages in a single thread. Example: Posting tasks to the main thread from a background thread to update the UI.

StarStarStarStar

Bound Service

StarStarStarStar

Purpose: To allow a component (like an Activity) to bind to a service for inter-process communication (IPC). Example: A music app's UI that communicates with a music-playing service.

StarStarStarStar

Thread Pool

StarStarStarStar

Purpose: To manage a pool of worker threads. Example: Executing multiple concurrent network operations efficiently.

StarStarStarStar

BroadcastReceiver

StarStarStarStar

Purpose: To allow the system and apps to send and receive broadcast messages. Example: Initiating a background service when the device completes booting.

StarStarStarStar

Background Service

StarStarStarStar

Purpose: To perform tasks that don't need to interact with the user. Example: Synchronizing app data with a server while the app is not actively used.

StarStarStarStar

Loader

StarStarStarStar

Purpose: To load data asynchronously in activities and fragments. Example: Loading a list of messages from the database without blocking the main thread.

StarStarStarStar

AsyncTask

StarStarStarStar

Purpose: To perform short-lasting background operations and updating the UI on completing. Example: Updating user interface with newly fetched weather data.

StarStarStarStar

Intent Flags

StarStarStarStar

Purpose: To control the behavior of the activity being launched. Example: Using NO_HISTORY flag so the activity isn't kept in the back stack.

StarStarStarStar

IntentService

StarStarStarStar

Purpose: To handle asynchronous tasks, one at a time, on a separate worker thread. Example: Handling network operations or image processing.

StarStarStarStar

SyncAdapter

StarStarStarStar

Purpose: To synchronize data between an Android device and a server. Example: Syncing user contacts with a server database.

StarStarStarStar

ContentProvider

StarStarStarStar

Purpose: To manage access to a structured set of data. Example: Providing a mechanism for data sharing between different applications.

StarStarStarStar

Service Lifecycle

StarStarStarStar

Purpose: To understand the lifecycle for managing services properly. Example: Knowing when to create, start, bind, unbind, and destroy a service.

Know
0
Still learning
Click to flip
Know
0
Logo

© Hypatia.Tech. 2024 All rights reserved.