{"id":21129775,"url":"https://github.com/vimalcvs/android-interview-questions","last_synced_at":"2026-02-25T16:03:39.984Z","repository":{"id":247709779,"uuid":"826633132","full_name":"vimalcvs/Android-Interview-Questions","owner":"vimalcvs","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-10T06:39:31.000Z","size":485,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T17:56:08.079Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vimalcvs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-10T04:52:34.000Z","updated_at":"2024-07-10T06:39:34.000Z","dependencies_parsed_at":"2024-07-14T10:50:34.083Z","dependency_job_id":null,"html_url":"https://github.com/vimalcvs/Android-Interview-Questions","commit_stats":null,"previous_names":["vimalcvs/inter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vimalcvs/Android-Interview-Questions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimalcvs%2FAndroid-Interview-Questions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimalcvs%2FAndroid-Interview-Questions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimalcvs%2FAndroid-Interview-Questions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimalcvs%2FAndroid-Interview-Questions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vimalcvs","download_url":"https://codeload.github.com/vimalcvs/Android-Interview-Questions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimalcvs%2FAndroid-Interview-Questions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29829410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T15:41:19.027Z","status":"ssl_error","status_checked_at":"2026-02-25T15:40:47.150Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T05:28:57.222Z","updated_at":"2026-02-25T16:03:39.966Z","avatar_url":"https://github.com/vimalcvs.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android Interview Questions\n\nWhat is an inline function in Kotlin?\nAn inline function in Kotlin is a function whose bytecode is inlined at the call site, reducing overhead.\n\nWhat is the advantage of using const in Kotlin?\nUsing const in Kotlin declares a compile-time constant, improving performance and reducing memory usage.\n\nWhat is a reified keyword in Kotlin?\nThe reified keyword in Kotlin allows type parameters of inline functions to be accessed at runtime.\n\nSuspending vs Blocking in Kotlin Coroutines  \nSuspending in Kotlin Coroutines pauses the coroutine without blocking the thread, while blocking halts the thread's execution.\n\nLaunch vs Async in Kotlin Coroutines  \nlaunch starts a coroutine that doesn't return a result, whereas async starts a coroutine that returns a Deferred result.\n\ninternal visibility modifier in KotlinThe internal visibility modifier makes a member visible within the same module.\n\nopen keyword in KotlinThe open keyword in Kotlin allows a class or member to be subclassed or overridden.\n\nlateinit vs lazy in Kotlinlateinit is used for late initialization of non-nullable properties, while lazy is used for lazy initialization of properties.\n\nWhat is Multidex in Android?  \nMultidex in Android allows apps to include more than 65,536 methods by splitting the app into multiple DEX files.\n\nHow does the Android Push Notification system work?  \nThe Android Push Notification system uses Firebase Cloud Messaging (FCM) to deliver messages to devices.\n\nHow does the Kotlin Multi Platform work?  \nKotlin Multi Platform allows sharing common code across multiple platforms like Android, iOS, and web.\n\nWhat is a ViewModel and how is it useful?  \nA ViewModel in Android holds and manages UI-related data, surviving configuration changes.\n\nIs it possible to force Garbage Collection in Android?  \nIt is not recommended to force Garbage Collection in Android, but you can suggest it using System.gc().\n\nWhat is a JvmStatic Annotation in Kotlin?The JvmStatic annotation in Kotlin generates a static method for a function in a companion object.\n\ninit block in KotlinThe init block in Kotlin is used to initialize the class when an instance is created.\n\nJvmField Annotation in KotlinThe JvmField annotation in Kotlin exposes a Kotlin property as a public Java field.\n\nsingleTask launchMode in AndroidThe singleTask launchMode in Android ensures a single instance of the activity is created, launching it in a new task.\n\nDifference between \\== and \\=== in Kotlin  \n\\== checks for structural equality, whereas \\=== checks for referential equality.\n\nJvmOverloads Annotation in KotlinThe JvmOverloads annotation generates overloaded methods for a function with default parameters.\n\nWhy is it recommended to use only the default constructor to create a Fragment?  \nUsing only the default constructor to create a Fragment ensures proper recreation during configuration changes.\n\nWhy do we need to call setContentView() in onCreate() of Activity class?We call setContentView() in onCreate() to define the layout resource for the activity's UI.\n\nWhen only onDestroy is called for an activity without onPause() and onStop()?  \nonDestroy is called directly when an activity finishes due to a system constraint or crash.\n\nWhat is the advantage of using const in Kotlin?Using const in Kotlin defines compile-time constants, improving performance and reducing memory usage.\n\nWhen to use lateinit keyword in Kotlin?Use lateinit for non-nullable properties that are initialized later than their declaration.\n\nWhat is an inline function in Kotlin?  \nAn inline function in Kotlin reduces the overhead of function calls by inserting the function's code at the call site.\n\nWhat are companion objects in Kotlin?  \nCompanion objects allow defining members that belong to a class rather than to instances, simulating static members.\n\nRemove duplicates from an array in Kotlin  \nUse array.distinct() to remove duplicates from an array in Kotlin.\n\nWhat is a JvmStatic Annotation in Kotlin?The JvmStatic annotation generates a static method for a function in a companion object.\n\nWhat is a JvmField Annotation in Kotlin?The JvmField annotation exposes a Kotlin property as a public Java field.\n\nWhat is a JvmOverloads Annotation in Kotlin?The JvmOverloads annotation generates overloaded methods for a function with default parameters.\n\nnoinline in KotlinThe noinline keyword prevents a lambda parameter from being inlined in an inline function.\n\ncrossinline in KotlinThe crossinline keyword ensures that a lambda parameter cannot use non-local returns.\n\nScope functions in Kotlin  \nScope functions (let, run, with, also, apply) provide concise ways to operate on objects within a limited scope.\n\nWhat is a reified keyword in Kotlin?  \nThe reified keyword allows type parameters of inline functions to be accessed at runtime.\n\nlateinit vs lazy in Kotlinlateinit is for non-nullable properties initialized later, while lazy is for properties initialized on first access.\n\nWhat is an init block in Kotlin?  \nThe init block in Kotlin initializes class properties during object creation.\n\nDifference between \\== and \\=== in Kotlin\\== checks for structural equality, whereas \\=== checks for referential equality.\n\nAdvantage of using const in Kotlinconst improves performance and reduces memory usage by defining compile-time constants.\n\nWhat are higher-order functions in Kotlin?  \nHigher-order functions take functions as parameters or return them, allowing for more abstract and flexible code.\n\nWhat are Lambdas in Kotlin  \nLambdas are anonymous functions that can be passed as arguments to higher-order functions.\n\nassociateBy - List to Map in KotlinThe associateBy function converts a list to a map using a specified key selector.\n\nopen keyword in KotlinThe open keyword allows a class or member to be subclassed or overridden.\n\nCompanion object in Kotlin  \nCompanion objects allow defining members that belong to a class rather than to instances.\n\ninternal visibility modifier in KotlinThe internal modifier makes a member visible within the same module.\n\npartition - filtering function in KotlinThe partition function splits a collection into two lists based on a predicate.\n\nInfix notation in Kotlin  \nInfix functions provide a more readable way to call functions with a single parameter.\n\nHow does the Kotlin Multi Platform work?  \nKotlin Multi Platform allows sharing common code across multiple platforms like Android, iOS, and web.\n\nSuspending vs Blocking in Kotlin Coroutines  \nSuspending pauses the coroutine without blocking the thread, while blocking halts the thread's execution.\n\nTell some advantages of Kotlin.  \nKotlin provides null safety, conciseness, interoperability with Java, and coroutine support for asynchronous programming.\n\nWhat is the difference between val and var?  \nval defines a read-only variable, while var defines a mutable variable.\n\nHow to check if a lateinit variable has been initialized?Use ::variable.isInitialized to check if a lateinit variable has been initialized.\n\nHow to do lazy initialization of variables in Kotlin?  \nUse the lazy delegate for lazy initialization of variables.\n\nWhat are the visibility modifiers in Kotlin?  \nKotlin's visibility modifiers are public, private, protected, and internal.\n\nWhat is the equivalent of Java static methods in Kotlin?  \nThe equivalent of Java static methods in Kotlin is methods in a companion object.\n\nWhat is a data class in Kotlin?  \nA data class in Kotlin is a class that automatically generates standard methods like equals(), hashCode(), and toString().\n\nHow to create a Singleton class in Kotlin?  \nUse the object keyword to create a Singleton class in Kotlin.\n\nWhat is the difference between open and public in Kotlin?open allows a class or member to be subclassed or overridden, while public specifies visibility.\n\nExplain the use-case of let, run, with, also, apply in Kotlin.These scope functions provide concise ways to operate on objects within a limited scope, each with slightly different behavior.\n\nHow to choose between apply and with?  \nUse apply to configure an object and return it, and with to run code on an object and return a result.\n\nDifference between List and Array types in Kotlin  \nA List is an immutable collection of elements, while an Array is a fixed-size collection of elements.\n\nWhat are Labels in Kotlin?  \nLabels in Kotlin are used to identify loop statements and expressions for more readable code flow control.\n\nWhat are Coroutines in Kotlin?  \nCoroutines provide a way to write asynchronous code sequentially, making it easier to manage background tasks.\n\nWhat is Coroutine Scope?  \nA Coroutine Scope defines the lifecycle of coroutines, determining when they start and stop.\n\nWhat is Coroutine Context?  \nCoroutine Context holds information about a coroutine, such as its dispatcher and job.\n\nLaunch vs Async in Kotlin Coroutines  \nlaunch starts a coroutine that doesn't return a result, while async starts a coroutine that returns a Deferred result.\n\nWhen to use Kotlin sealed classes?  \nUse sealed classes to represent restricted class hierarchies where a type can be one of a limited set of types.\n\nTell about the Collections in Kotlin  \nKotlin collections include List, Set, and Map, providing various functionalities for handling groups of elements.\n\nExtension functions  \nExtension functions allow adding new functionality to existing classes without modifying their code.\n\nWhat does ?: do in Kotlin? (Elvis Operator)The Elvis operator returns the left-hand operand if it's not null, otherwise returns the right-hand operand.\n\n### Android Basics\n\nWhy does an Android App lag?\n\nApp lag can be caused by inefficient code, memory leaks, or poor resource management.\n\nWhat is Context? How is it used?\n\nContext provides access to resources and application-specific information.\n\nTell all the Android application components.\n\nActivities, Services, Broadcast Receivers, Content Providers.\n\nWhat is the project structure of an Android Application?\n\nA typical structure includes manifest, java, res, and gradle files.\n\nWhat is AndroidManifest.xml?\n\nIt's a file that contains essential information about the app, such as permissions and components.\n\nWhat is the Application class?\n\nThe base class that maintains global application state.\n\n### Activity and Fragment\n\nWhy is it recommended to use only the default constructor to create a Fragment? \n\nTo ensure the fragment can be properly recreated by the system.\n\nWhat is Activity and its lifecycle? \n\nAn Activity is a single screen with a user interface; its lifecycle includes states like created, started, resumed, paused, stopped, and destroyed.\n\nWhat is the difference between onCreate() and onStart()? \n\nonCreate() is called when the activity is first created, while onStart() is called when the activity becomes visible.\n\nWhen only onDestroy is called for an activity without onPause() and onStop()? \n\nWhen the activity is finished due to a configuration change.\n\nWhy do we need to call setContentView() in onCreate() of Activity class? \n\nTo set the user interface layout for the activity.\n\nWhat is onSaveInstanceState() and onRestoreInstanceState() in activity?\n\n Methods to save and restore the activity's UI state.\n\nWhat is Fragment and its lifecycle? \n\nA Fragment is a modular section of an activity; its lifecycle includes states like attached, created, created view, started, resumed, paused, stopped, destroyed view, and detached.\n\nWhat are \"launchMode\"? \n\nThey define the behavior of activities regarding instance creation and task management (standard, singleTop, singleTask, singleInstance).\n\nWhat is the difference between a Fragment and an Activity? Explain the relationship between the two. -\n\nAn Activity is a full-screen interface, while a Fragment is a reusable portion of the interface managed within an Activity.\n\nWhen should you use a Fragment rather than an Activity? \n\nFor reusable UI components or multi-pane layouts.\n\nWhat is the difference between FragmentPagerAdapter vs FragmentStatePagerAdapter? \n\nFragmentPagerAdapter retains fragment instances, while FragmentStatePagerAdapter destroys fragments to save memory.\n\nWhat is the difference between adding/replacing fragment in backstack? \n\nAdding keeps the old fragment in memory, replacing does not.\n\nHow would you communicate between two Fragments? \n\nUse a shared ViewModel or a callback interface.\n\nWhat is retained Fragment? \n\nA fragment that is retained across activity re-creation.\n\nWhat is the purpose of addToBackStack() while committing fragment transaction? \n\nIt allows the fragment transaction to be reversed on back press.\n\n### Views and ViewGroups\n\nWhat is View in Android? \n\nA UI component like a button or text field.\n\nDifference between View.GONE and View.INVISIBLE? \n\nGONE removes the view from the layout, INVISIBLE hides it but retains its space.\n\nCan you create a custom view? How? \n\nYes, by extending the View class and overriding its methods.\n\nWhat are ViewGroups and how are they different from the Views? \n\nViewGroups are containers for views, providing layout structure.\n\nWhat is a Canvas? \n\nA drawing surface for custom graphics.\n\nWhat is a SurfaceView? \n\nA view for rendering content on a separate thread.\n\nRelative Layout vs LinearLayout. -\n\nRelativeLayout arranges views relative to each other, LinearLayout arranges them in a single direction.\n\nTell about Constraint Layout. -\n\nA flexible layout that allows you to position views relative to each other or the parent container.\n\nDo you know what is the view tree? How can you optimize its depth? \n\nThe hierarchical structure of views; optimize by flattening the hierarchy.\n\n### Displaying Lists of Content\n\nWhat is the difference between ListView and RecyclerView? \n\nRecyclerView is more flexible and efficient with view recycling and layout management.\n\nHow does RecyclerView work internally? \n\nIt uses a ViewHolder pattern for efficient view recycling and binding.\n\nRecyclerView Optimization - Scrolling Performance Improvement -\n\nUse ViewHolders, DiffUtil, and avoid nested layouts.\n\nOptimizing Nested RecyclerView -\n\nUse efficient layout managers and avoid deeply nested structures.\n\nWhat is SnapHelper? \n\nA utility that helps snap views in a RecyclerView to specific positions.\n\n### Dialogs and Toasts\n\nWhat is Dialog in Android? \n\nA small window that prompts the user to make a decision or enter information.\n\nWhat is Toast in Android? \n\nA brief message that pops up on the screen.\n\nWhat is the difference between Dialog and Dialog Fragment? \n\nDialogFragment is a fragment that displays a dialog, integrating better with the activity lifecycle.\n\n### Intents and Broadcasting\n\nWhat is Intent? \n\nA messaging object used to request an action from another app component.\n\nWhat is an Implicit Intent? \n\nAn intent that does not specify a component, allowing any app that can handle the action to respond.\n\nWhat is an Explicit Intent? \n\nAn intent that specifies the target component to handle the action.\n\nWhat is a BroadcastReceiver? \n\nA component that listens for and responds to system-wide broadcast announcements.\n\nWhat is a Sticky Intent? \n\nAn intent that sticks around after being broadcast, so other components can retrieve the data later.\n\nDescribe how broadcasts and intents work to pass messages around your app? \n\nBroadcasts send system-wide messages, while intents pass data and request actions within or between apps.\n\nWhat is a PendingIntent? \n\nA wrapper around an intent that allows it to be executed by another application.\n\n### Services\n\nWhat is Service? \n\nA component for performing long-running operations in the background.\n\nService vs IntentService -\n\nService runs on the main thread; IntentService runs in a background thread.\n\nWhat is a Foreground Service? \n\nA service that continues running in the foreground, displaying a notification.\n\nWhat is a JobScheduler? \n\nA manager for scheduling jobs to run in the background.\n\n### Inter-process Communication\n\nHow can two distinct Android apps interact? \n\nThrough intents, content providers, and AIDL.\n\nIs it possible to run an Android app in multiple processes? How? \n\nYes, by specifying process attributes in the manifest.\n\nWhat is AIDL? \n\nAndroid Interface Definition Language for communication between services in different processes.\n\nWhat can you use for background processing in Android? \n\nServices, WorkManager, AsyncTask, and Kotlin Coroutines.\n\nWhat is a ContentProvider and what is it typically used for? \n\nA component for managing shared app data.\n\n### Long-running Operations\n\nHow to run parallel tasks and get a callback when all are complete? \n\nUsing Kotlin Coroutines with async and awaitAll.\n\nWhat is ANR? How can the ANR be prevented? \n\nApplication Not Responding; prevent by avoiding long operations on the main thread.\n\nWhat is an AsyncTask (Deprecated in API level 30)?\n\nA class for performing background operations and publishing results on the UI thread.\n\nWhat are the problems in AsyncTask? \n\nMemory leaks and context retention.\n\nExplain Looper, Handler, and HandlerThread. \n\nLooper runs a message loop for a thread; Handler sends and processes messages; HandlerThread creates a thread with a Looper.\n\nAndroid Memory Leak and Garbage Collection\n\nMemory leaks occur when objects are not properly disposed of; garbage collection reclaims memory.\n\n### Working With Multimedia Content\n\nHow do you handle bitmaps in Android as it takes too much memory? \n\nUse BitmapFactory options for scaling and caching.\n\nTell me about the Bitmap pool. -\n\nA memory pool for reusing bitmaps to reduce memory allocation.\n\n### Data Saving\n\nJetpack DataStore Preferences -\n\nA data storage solution that is safer and more efficient than SharedPreferences.\n\nHow to persist data in an Android app? \n\nUse SharedPreferences, Room, or DataStore.\n\nWhat is ORM? How does it work? \n\nObject-Relational Mapping; it abstracts database interactions using objects.\n\nHow would you preserve the Activity state during a screen rotation? \n\nSave instance state and use ViewModel.\n\nWhat are different ways to store data in your Android app? \n\nSharedPreferences, SQLite, Room, files, and DataStore.\n\nExplain Scoped Storage in Android. -\n\nA storage model that restricts access to shared storage to enhance privacy.\n\nHow to encrypt data in Android? \n\nUse the Android Keystore System and cryptography libraries.\n\nWhat is commit() and apply() in SharedPreferences? \n\ncommit() is synchronous, apply() is asynchronous.\n\n### Look and Feel\n\nWhat is a Spannable? \n\nAn interface for text with markup.\n\nWhat is a SpannableString? \n\nA string with mutable span information.\n\nWhat are the best practices for using text in Android? \n\nUse resources for strings, support localization, and prefer Spannables for styling.\n\nHow to implement Dark mode in any application? \n\nUse theme resources and the AppCompatDelegate to switch themes.\n\nWhat are themes and styles? How do you use them? \n\nThemes are collections of attributes; styles define the look of UI components.\n\nHow to change the font of the app? \n\nUse custom fonts with the fontFamily attribute or Typeface.\n\nExplain the vector drawable? \n\nScalable images defined in XML.\n\n### Debugging and Testing\n\nHow to debug an android application? \n\nUse Android Studio's debugger, logs, and breakpoints.\n\nTell about the test automation tools available for Android. -\n\nEspresso, UI Automator, and Robolectric.\n\n### Additional Questions\n\nWhat is a ViewModel? \n\nA component for managing UI-related data lifecycle.\n\nWhat is LiveData? \n\nA lifecycle-aware data holder.\n\nHow can you save data in an Android application? \n\nUse Room, SharedPreferences, DataStore, or file storage.\n\nHow does Dagger2 work? \n\nIt provides dependency injection through compile-time code generation.\n\n### Kotlin Coroutines Topics\n\ncoroutines:  \nCoroutines in Kotlin provide a way to write asynchronous code sequentially, making it easier to manage background tasks.\n\nsuspend:  \nThe suspend keyword in Kotlin marks a function as suspendable, allowing it to be paused and resumed without blocking the thread.\n\nlaunch, async-await, withContext:\n\nlaunch: Starts a new coroutine without returning a result.\n\nasync-await: Starts a coroutine that returns a Deferred result, which can be awaited.\n\nwithContext: Changes the coroutine context, blocking until the code within it completes.\n\ndispatchers:  \nDispatchers in Kotlin Coroutines specify the thread or thread pool on which a coroutine runs, such as Dispatchers.Main for the main thread and Dispatchers.IO for I/O operations.\n\nscope, context, job:\n\nscope: Defines the lifecycle of coroutines, typically bound to a lifecycle component like an activity or ViewModel.\n\ncontext: Holds information about the coroutine, such as its dispatcher and job.\n\njob: Represents a coroutine's lifecycle, allowing you to cancel it.\n\nlifecycleScope, viewModelScope, GlobalScope:\n\nlifecycleScope: A CoroutineScope tied to the lifecycle of an Activity or Fragment.\n\nviewModelScope: A CoroutineScope tied to a ViewModel, automatically cancelled when the ViewModel is cleared.\n\nGlobalScope: A global CoroutineScope that lives for the entire application's lifetime (use with caution).\n\nsuspendCoroutine, suspendCancellableCoroutine:\n\nsuspendCoroutine: A low-level API to convert callback-based code to coroutines.\n\nsuspendCancellableCoroutine: Similar to suspendCoroutine, but also allows the coroutine to be cancelled.\n\ncoroutineScope, supervisorScope:\n\ncoroutineScope: Creates a scope and waits for all its children coroutines to complete.\n\nsupervisorScope: Similar to coroutineScope, but child coroutines do not cancel their siblings if they fail.\n\n### Kotlin Flow API Topics\n\nFlow Builder: Functions like flow {} to create a flow of values.\n\nOperator: Functions that transform or manipulate the data in a flow, like map and filter.\n\nCollector: Functions that collect and handle the emitted values from a flow, like collect {}.\n\nflowOn: Changes the coroutine context of the upstream flow, specifying which dispatcher to use.\n\ndispatchers: Specify the thread or thread pool on which to run the flow, such as Dispatchers.IO for I/O operations.\n\nOperators such as\n\nfilter: Emits only values that satisfy a given predicate.\n\nmap: Transforms each emitted value using a provided function.\n\nzip: Combines values from multiple flows into pairs.\n\nflatMapConcat: Flattens and concatenates flows emitted by a source flow.\n\nretry: Retries the flow on failure with a specified strategy.\n\ndebounce: Emits values after a specified timeout if no new values are emitted during that time.\n\ndistinctUntilChanged: Emits values only if they are distinct from the previous one.\n\nflatMapLatest: Flattens and switches to the latest flow emitted by a source flow.\n\nTerminal operators:  \nFunctions that trigger the execution of the flow and collect its values, such as collect, toList, and first.\n\nCold Flow: Starts emitting values only when collected, each collector gets its own emissions.\n\nHot Flow: Emits values regardless of collectors, shared among multiple collectors.l̥\n\nStateFlow: A state-holder observable flow that emits the current and new states to collectors.\n\nSharedFlow: A hot flow that emits values to multiple collectors, useful for events.\n\ncallbackFlow: Creates a flow from callback-based APIs, suspending on receive channel operations.\n\nchannelFlow: A flow builder that uses a channel to emit values, supporting both cold and hot flows.\n\n### Other Topics - One Line Answers\n\nDescribe SQLite. -\n\nSQLite is a lightweight, relational database engine embedded in Android for local data storage.\n\nHave you used Room-Database? \n\nYes, Room is an abstraction layer over SQLite, providing a more robust and easier way to manage database interactions.\n\nCan we identify the users who have uninstalled our application? \n\nNo, it’s not possible to track uninstalled users directly.\n\nAndroid Development Best Practices. -\n\nFollow coding standards, optimize performance, secure data, and conduct thorough testing.\n\nReact Native vs Flutter. -\n\nReact Native uses JavaScript, Flutter uses Dart; both are popular for cross-platform app development.\n\nWhat are the metrics that you should measure continuously while android application development? \n\nMonitor app launch time, memory usage, CPU usage, network latency, and crash rates.\n\nHow to avoid API keys from check-in into VCS? \n\nUse environment variables, properties files, or secret management tools.\n\nHow does the Kotlin Multi Platform work? \n\nIt allows sharing common code across multiple platforms (iOS, Android, JVM, JS) while maintaining platform-specific code.\n\nHow to use Memory Heap Dumps data? \n\nAnalyze heap dumps using tools like Android Studio Profiler or MAT to identify memory leaks and optimize memory usage.\n\nHow to implement Dark Theme in your app? \n\nUse theme resources and AppCompatDelegate.setDefaultNightMode() to switch between light and dark themes.\n\nHow to secure the API keys used in an Android App? \n\nStore API keys in native code using the NDK, encrypted storage, or secure environment variables.\n\nTell something about memory usage in Android. -\n\nEfficient memory management is crucial to avoid memory leaks and ensure smooth app performance.\n\nExplain Annotation processing. -\n\nIt involves generating code or performing compile-time checks based on annotations in the code.\n\nHow does the Android Push Notification system work? \n\nIt uses Firebase Cloud Messaging (FCM) to deliver notifications from servers to Android devices.\n\nHow to show local Notification at an exact time? \n\nUse AlarmManager to schedule the exact time and NotificationManager to show the notification.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimalcvs%2Fandroid-interview-questions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvimalcvs%2Fandroid-interview-questions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimalcvs%2Fandroid-interview-questions/lists"}