Answer: Activities, Services, Broadcast Receivers, Content Providers.
Answer: The Activity lifecycle includes states like onCreate, onStart, onResume, onPause, onStop, and onDestroy, managing UI and resources.
Answer: Intents are messages used for inter-component communication, starting activities or services.
Answer: An Activity represents a single screen, while a Fragment is a reusable portion of UI that can be embedded in activities.
Answer: Override onSaveInstanceState and onRestoreInstanceState, or use ViewModel to retain data.
Answer: A Content Provider manages access to a structured set of data, allowing data sharing between applications.
Answer: The AndroidManifest.xml file declares the app's components, permissions, and features.
Answer: Use ActivityCompat.requestPermissions() to request permissions, handling the result in onRequestPermissionsResult().
Answer: Serializable is a standard Java interface for object serialization, while Parcelable is Android-specific, optimized for performance.
Answer: Broadcast Receivers listen for and respond to broadcast messages from other applications or the system.
Answer: Services run in the background to perform long-running operations without a user interface.
Answer: The Application class serves as the base class for maintaining global application state and resources.
Answer: Use the Navigation Component or Intent-based navigation to switch between activities and fragments.
Answer: ViewModel is part of Android Architecture Components, designed to store and manage UI-related data in a lifecycle-conscious way.
Answer: RecyclerView is more flexible and efficient for large datasets, supporting different layouts and view types, unlike ListView.
Answer: Use SQLite, Room, or SharedPreferences for data storage solutions.
Answer: Retrofit is a type-safe HTTP client for Android used for making network requests and handling API responses.
Answer: Gradle is the build system for Android, managing project dependencies, builds, and configurations.
Answer: Launch modes include standard, singleTop, singleTask, and singleInstance, defining how activities are instantiated.
Answer: Fragments are modular sections of an activity's UI, promoting reuse and dynamic UI.
Answer: Set up an Adapter, ViewHolder, and LayoutManager to populate data in a RecyclerView.
Answer: LiveData is a lifecycle-aware data holder that allows UI components to observe changes in data.
Answer: ViewHolder pattern optimizes performance by caching views, reducing findViewById calls in RecyclerView.
Answer: Use a separate activity or theme with a delay to show a splash screen during app launch.
Answer: Jetpack is a set of components and libraries for Android development, providing best practices and modern architecture patterns.
Answer: AsyncTask is a class that enables background operations and UI updates without blocking the main thread.
Answer: Dependency Injection provides objects that a class needs (dependencies), promoting decoupling and easier testing.
Answer: onCreateView inflates the layout for the Fragment and initializes the UI components.
Answer: Extend View or ViewGroup, override necessary methods, and implement custom drawing or behavior.
Answer: ANR (Application Not Responding) occurs when the main thread is blocked for too long, causing the app to become unresponsive.
Answer: Use Firebase Cloud Messaging (FCM) to send push notifications to Android devices.
Answer: Optimize background tasks, limit network calls, and use efficient data structures to reduce battery consumption.
Answer: Context provides access to application-specific resources and classes, facilitating interaction with the Android system.
Answer: Use SharedPreferences, SQLite, or Room for storing user settings and preferences.
Answer: Service runs on the main thread, while IntentService runs on a background thread, handling asynchronous tasks.
Answer: Use AsyncTask, Thread, or modern approaches like Kotlin Coroutines or RxJava for multi-threading.
Answer: FragmentManager handles the addition, removal, and management of Fragments within an Activity.
Answer: Use ConstraintLayout, styles, and dimensions to adapt layouts to different screen sizes.
Answer: Material Components are UI components that follow Material Design guidelines, enhancing app aesthetics and usability.
Answer: Use Data Binding Library to bind UI components directly to data sources, reducing boilerplate code.
Answer: Handler facilitates communication between threads, allowing background tasks to communicate with the UI thread.
Answer: The back stack maintains the order of activities/fragments for proper navigation and state management.
Answer: Use XML or programmatic animations with the Animation framework or Transition APIs.
Answer: CoordinatorLayout provides advanced control over child views and coordinates animations and transitions.
Answer: Use DrawerLayout and NavigationView to implement a sliding navigation drawer in your app.
Answer: Registering a BroadcastReceiver allows your app to listen for specific system-wide or application-wide events.
Answer: Use intent filters in the AndroidManifest.xml to define deep link URLs and handle navigation accordingly.
Answer: Room is a persistence library that provides an abstraction layer over SQLite, simplifying database interactions.
Answer: View is a UI element, while ViewGroup is a container that holds and arranges other views.
Answer: Use the Singleton pattern by creating a static instance and ensuring only one instance exists throughout the app lifecycle.