Senior Android Developer
100+ Senior Android Developer Interview Questions and Answers
A binary array is an array consisting of only 0s and 1s.
You are given a binary array "arr" of size āNā. Your task is to sort the given array and return this array after sorting.
Input Forma...read more
You are given an array (ARR) of length N, consisting of integers. You have to find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.
A subarray is a ...read more
Senior Android Developer Interview Questions and Answers for Freshers
Q3. what is daemon Thread? what is data Class? Garbage Collector? Activity Lifecycle? what is Fragment? what took you used for App Debugging ? how to revert changes pushed in GIT? write down example of Data class i...
read moreQuestions related to Android development concepts and practices.
Daemon thread is a low priority thread that runs in the background.
Data class is a class that is used to hold data and provides default implementations of common methods like equals, hashCode, and toString.
Garbage collector is a mechanism that automatically frees up memory by removing objects that are no longer in use.
Activity lifecycle refers to the various states an activity can be in, such as onCreate, onStart...read more
How recycler view works internally?
Q5. What is a Service? How can a notification in a Foreground Service interact with other components e.g. buttons in a music player?
A Service is a component that runs in the background to perform long-running operations. A Foreground Service is a Service that has a notification to show the user that it is running.
A Service is used to perform long-running operations in the background, such as playing music in a music player app.
A Foreground Service is a type of Service that has a notification to indicate to the user that it is running and to give it higher priority, making it less likely to be killed by th...read more
Q6. Which data structure is used to store views in a layout?
The data structure used to store views in a layout is a tree structure.
Views in a layout are stored in a hierarchical tree structure.
Each view is a node in the tree, with parent-child relationships defining the layout.
Examples include LinearLayout, RelativeLayout, and ConstraintLayout.
Share interview questions and help millions of jobseekers š
What is a view model? What are its advantages?
Q8. What functions would you add in an Image Loader library?
Functions to add in an Image Loader library for Senior Android Developer role
Support for loading images from different sources like network, local storage, and resources
Caching mechanism to improve performance and reduce network calls
Ability to handle image loading in different formats like JPEG, PNG, GIF, etc.
Support for placeholder images while the actual image is being loaded
Error handling for failed image loading requests
Option to customize image loading behavior like res...read more
Senior Android Developer Jobs
Q9. What is an activity, service, view model, live data and jetpack compose
Activity, service, view model, live data, and Jetpack Compose are key components in Android development.
Activity: Represents a single screen with a user interface. Example: MainActivity.
Service: Performs long-running operations in the background without a user interface. Example: MusicPlayerService.
View Model: Stores and manages UI-related data in a lifecycle-conscious way. Example: MainViewModel.
Live Data: Data holder class that is lifecycle-aware and ensures UI updates only...read more
Q10. 1. What is happen when App is launch on Android 2. Internal working of MVVM 3. System design for 2 page App that has one listing and detail page 4. Clean Architecture 5. How garbage collector works 6. Move even...
read moreAnswers to various technical questions related to Android development.
1. When an app is launched on Android, the system creates a new instance of the Activity class for the main activity and loads the layout.
2. MVVM (Model-View-ViewModel) is a design pattern that separates the UI, business logic, and data. The View interacts with the ViewModel to update the data.
3. For a 2-page app with a listing and detail page, you can design a navigation flow using activities or fragments....read more
Q11. Data structure and algorithm : find maximum sum subarray. Separate zeroes and ones in array. Android questions : viewmodel under the hood, recycler view under the hood, implement viewmodel.
Questions on data structure, algorithm, and Android development.
To find maximum sum subarray, use Kadane's algorithm
To separate zeroes and ones in array, use two pointers approach
ViewModel is a class that stores and manages UI-related data
RecyclerView is a flexible view for providing a limited window into a large data set
To implement ViewModel, extend ViewModel class and override onCleared() method
Q12. How can you recover the uninstall rate of the android app?
To recover uninstall rate of an android app, analyze user feedback, improve app performance, and offer incentives.
Analyze user feedback to identify reasons for uninstallation
Improve app performance to reduce crashes and bugs
Offer incentives such as discounts or exclusive content to encourage reinstallation
Q13. Find the vowels in a string and convert that into upper case
Convert vowels in a string to uppercase
Iterate through each character in the string
Check if the character is a vowel (a, e, i, o, u)
If it is a vowel, convert it to uppercase
Q14. What is Google firebase? How to integrate FCM. why do you like not
Firebase is a mobile and web application development platform developed by Google. FCM is Firebase Cloud Messaging, a messaging service for Android, iOS, and web applications.
Firebase provides a range of services including authentication, real-time database, cloud storage, and hosting.
FCM allows developers to send notifications and messages to users on Android, iOS, and web applications.
To integrate FCM, developers need to add the Firebase SDK to their app and configure the F...read more
Q15. Print prime numbers between 100 to 1,00,000
Print prime numbers between 100 to 1,00,000
Start with a loop from 100 to 100000
Check if the current number is prime or not
If prime, print the number
Q16. Find largest subarray with equal number of 1s and 0s?
Find largest subarray with equal number of 1s and 0s
Use a hashmap to store the count of 1s and 0s encountered so far
If the count of 1s and 0s is equal at any point, calculate the length of subarray
Keep track of the maximum length subarray found so far
Q17. How to detect loop in linked list?
To detect loop in linked list, use Floyd's cycle-finding algorithm.
Create two pointers, slow and fast, and initialize both to the head of the linked list.
Move slow pointer by one node and fast pointer by two nodes.
If there is a loop, the two pointers will eventually meet.
If there is no loop, the fast pointer will reach the end of the linked list.
Time complexity: O(n), Space complexity: O(1)
Q18. Why do we prefer the use of ConstraintLayout?
ConstraintLayout is preferred for its flexibility, efficiency, and ease of use in creating complex layouts.
Allows for creating complex layouts with a flat view hierarchy, improving performance
Supports responsive design with constraints that adapt to different screen sizes
Easier to use and understand compared to other layout options like RelativeLayout
Provides tools like Layout Editor in Android Studio for visual editing of layouts
Q19. Explain Work manager and how it is implemented
Work manager is an Android library that manages background tasks efficiently.
Work manager is part of Android Jetpack and is used for deferrable background tasks.
It provides a way to schedule tasks that need to run even if the app is in the background or not running.
Work manager handles task constraints, retries, and backoff policies automatically.
Tasks can be one-time or periodic, with support for specifying constraints like network availability or charging status.
Example: Wo...read more
Q20. What are content providers? What are its uses?
Content providers are components in Android that manage access to a structured set of data. They are used to share data between apps.
Content providers allow apps to securely share data with other apps
They provide a standard interface for querying and modifying data
Content providers are often used to access data from databases or files
Examples include the Contacts Provider for accessing contact information and the Media Provider for accessing media files
Q21. What are the Android application components used in previous project? Gi e example
The Android application components used in the previous project include activities, services, broadcast receivers, and content providers.
Activities: Used for the user interface and interaction with the user. Example: MainActivity.java
Services: Used for background tasks or long-running operations. Example: DownloadService.java
Broadcast Receivers: Used for system-wide events or notifications. Example: ConnectivityReceiver.java
Content Providers: Used for data management and shar...read more
Q22. What is the root class in Java and what it is used for
The root class in Java is the Object class, which is the parent class for all other classes in Java.
The Object class is used to provide common methods and behaviors that are inherited by all other classes.
It defines methods like toString(), equals(), and hashCode() that can be overridden by subclasses.
All classes in Java implicitly extend the Object class, either directly or indirectly.
For example, the String class extends the Object class.
Q23. Difference between Authentication and Authorisation. What Coroutine makes it different than threads. Small DS algorithm. Practical usage of viewmodel and coroutine. What is livedata.
Authentication is the process of verifying the identity of a user, while authorization is the process of granting access to specific resources.
Authentication ensures that the user is who they claim to be, usually through credentials like username and password.
Authorization determines what actions a user is allowed to perform on a system or resource.
Coroutines are lightweight threads that allow for asynchronous programming in a more sequential and structured manner.
Coroutines ...read more
Q24. What is push notification and how implemented in android
Push notification is a message that pops up on a mobile device. It can be implemented in Android using Firebase Cloud Messaging (FCM) or Google Cloud Messaging (GCM).
Push notifications are messages sent from a server to a client app that wakes up the app to inform the user of new messages or events.
In Android, push notifications can be implemented using Firebase Cloud Messaging (FCM) or Google Cloud Messaging (GCM) APIs.
Developers need to set up a server to send push notifica...read more
Q25. What is Flow, Channel diffrent between StateFlow and SharedFlow
Flow is a cold asynchronous data stream, Channel is a hot asynchronous data stream. StateFlow is a hot asynchronous data stream with a state, SharedFlow is a hot asynchronous data stream without a state.
Flow is a cold asynchronous data stream that emits values one by one.
Channel is a hot asynchronous data stream that can have multiple subscribers.
StateFlow is a hot asynchronous data stream that retains the most recent value and emits it to new subscribers.
SharedFlow is a hot ...read more
Q26. Design a video streaming app's search page
The search page of a video streaming app should allow users to easily search for and discover content.
Include a search bar at the top for users to enter keywords or phrases
Display relevant search results in a grid or list format
Provide filters or sorting options to refine search results
Include thumbnails, titles, and brief descriptions of the search results
Allow users to click on search results to view more details or start streaming
Q27. Advantage of MVC, MVP, MVVM Glide vs Picasso Bitmap Sampling what is viewStub how to achieve fix size in Recyclerview. Inline vs normal function. Work request in Work manager
MVC, MVP, MVVM are design patterns for organizing code. Glide and Picasso are image loading libraries. Bitmap sampling is resizing images. ViewStub is a lightweight view. RecyclerView can achieve fixed size with setHasFixedSize(true). Inline functions are defined within a class. WorkManager can schedule background tasks.
MVC, MVP, MVVM are design patterns for organizing code
Glide and Picasso are popular image loading libraries
Bitmap sampling is resizing images to reduce memory...read more
Q28. Given Kotlin extension function what could be the output.
Kotlin extension functions allow adding new functions to existing classes without modifying their source code.
Extension functions are defined outside the class they extend.
They can be called on the object of the class they extend.
They can access the properties and functions of the class they extend.
Q29. What is inline function and highorder function?
Inline functions are functions that are expanded in place at the call site, while high-order functions are functions that can take other functions as parameters or return them.
Inline functions are expanded in place at the call site to improve performance.
High-order functions can take other functions as parameters or return them.
Example of high-order function: map() function in Kotlin.
Q30. How do you handle the multiple view in Recyclerview?
Multiple views in RecyclerView can be handled by using different view types and view holders.
Use getItemViewType() method to return different view types based on position
Create multiple view holders for each view type
Bind data to each view holder based on its type
Example: Creating a chat app with different message types like text, image, and video
Implement view model
Q32. How did you solve a particular problem regarding android development
I solved a problem by implementing a custom view to display complex data in a more user-friendly way.
Identified the specific requirements and limitations of the problem
Researched and experimented with different solutions, including using third-party libraries
Implemented a custom view with optimized performance and user experience
Tested the solution thoroughly to ensure it met the desired functionality
Q33. What is the difference between service and Intent Service
Service is a base class for Android services that can run in the background, while IntentService is a subclass of Service that handles asynchronous requests on demand.
Service is a base class for Android services that can run indefinitely in the background, while IntentService is a subclass of Service that handles asynchronous requests one at a time.
Service does not have a default worker thread, so you need to manage the thread manually, whereas IntentService creates a worker ...read more
Q34. What is car propertymanager and mostly in to aosp
Car propertymanager is a component in AOSP that manages properties related to car-specific features.
Car propertymanager is used to handle properties like car make, model, year, etc.
It is mostly used in Android Automotive OS for managing car-specific settings and configurations.
Developers can use car propertymanager to access and modify car-related properties in their apps.
Q35. What are coroutines, how do they work internally
Coroutines are a concurrency design pattern in Kotlin that allow for asynchronous programming.
Coroutines are lightweight threads that can be used to perform non-blocking operations.
They are based on the concept of suspending functions, which can be paused and resumed.
Coroutines use a dispatcher to determine which thread or thread pool to run on.
They can be used to simplify asynchronous code and avoid callback hell.
Coroutines can be used with various libraries and frameworks, ...read more
Q36. What is IPC and RPC?
IPC stands for Inter-Process Communication and RPC stands for Remote Procedure Call.
IPC is a mechanism that allows communication between processes running on the same or different devices.
RPC is a protocol that enables one program to request a service from another program on a remote machine.
IPC can be achieved through shared memory, message passing, and pipes.
RPC uses a client-server model and can be implemented using various protocols such as HTTP, TCP, and UDP.
Both IPC and...read more
Q37. count pretty number(ending with 2, 3, 7) With in the range of x to y.
Count pretty numbers ending with 2, 3, or 7 within a given range.
Iterate through the range from x to y and check if each number ends with 2, 3, or 7.
Increment a counter for each pretty number found.
Return the total count of pretty numbers within the range.
Q38. What are Dispatchers in Kotlin Coroutines?
Dispatchers in Kotlin Coroutines are responsible for determining which thread or threads the coroutines should run on.
Dispatchers help manage the execution of coroutines on different threads.
There are different types of Dispatchers like Default, IO, Main, and Unconfined.
Example: launch(Dispatchers.IO) { // perform network operations }
Q39. Write a high level design of the given app feature.
Design a feature for an app
Identify the purpose and goals of the feature
Define the user flow and interactions
Consider the technical requirements and constraints
Design the UI/UX
Plan the data model and storage
Consider scalability and performance
Implement and test the feature
Q40. Explain MVVM Architecture and other architecture used in Android.
MVVM is a design pattern that separates the UI, business logic, and data layers in Android development.
MVVM stands for Model-View-ViewModel.
Model represents the data and business logic.
View is the UI component that displays the data and interacts with the user.
ViewModel acts as a mediator between the Model and View, handling data operations and updating the UI.
Other architectures used in Android include MVP (Model-View-Presenter) and MVC (Model-View-Controller).
Q41. What are the different launch odes in Android
Different launch modes in Android control how a new instance of an activity is associated with the current task.
Standard - The default launch mode, creates a new instance of the activity in the task.
SingleTop - If an instance of the activity already exists at the top of the task, it will not be recreated.
SingleTask - A new task will always be created and a new instance of the activity will be launched in it.
SingleInstance - The activity will be the only one in the task, no ot...read more
Q42. How do you find middle of linkedlist
To find the middle of a linked list, use the slow and fast pointer technique.
Initialize two pointers, slow and fast, at the head of the linked list.
Move the slow pointer by one node and the fast pointer by two nodes until the fast pointer reaches the end of the list.
The node pointed to by the slow pointer at this point is the middle of the linked list.
Q43. How retrofit is integrated
Retrofit is integrated in Android apps using a few simple steps.
Add Retrofit dependency in build.gradle file
Create an interface with API endpoints using Retrofit annotations
Instantiate Retrofit object with base URL and converter factory
Create API service using the interface and Retrofit object
Make API calls using the service and handle responses
Q44. How to create custom UI
Custom UI can be created by designing layouts using XML or programmatically in Android.
Design UI elements using XML in layout files
Customize UI elements programmatically using Java or Kotlin
Use libraries like ConstraintLayout for complex layouts
Implement custom views by extending existing views or creating new ones
Q45. Different activity launch modes, services, intent-services
Different launch modes control how activities are launched, services run in the background, and intent-services handle asynchronous tasks.
Launch modes include standard, singleTop, singleTask, and singleInstance
Services are used for long-running operations in the background
Intent-services are used for handling asynchronous tasks on a separate worker thread
Q46. Generics in kotlin and java interportability with kotlin
Generics in Kotlin and Java can be used interchangeably, but there are some differences in syntax and features.
Kotlin supports declaration-site variance, while Java supports use-site variance.
In Kotlin, you can use reified generics with inline functions, which is not possible in Java.
Kotlin has nullable types by default, while in Java you need to use wildcards for similar behavior.
Q47. How will you handle prod defects
Prod defects are handled by identifying, prioritizing, and resolving them in a systematic manner.
Create a process for reporting and tracking defects
Prioritize defects based on impact and severity
Assign resources to investigate and fix defects
Perform root cause analysis to identify the underlying issues
Implement fixes and thoroughly test them before deploying
Communicate with stakeholders about the status and resolution of defects
Q48. what is Corotuine and explain builder type.
Coroutines are a way to perform asynchronous programming in Android. Builder type is used to create and configure a coroutine.
Coroutines in Android are used for managing asynchronous tasks without blocking the main thread.
Builder type is used to create a coroutine with specific configuration options.
Example: 'launch' is a builder type used to start a new coroutine.
Q49. What is most efficient layout to use on android
ConstraintLayout is the most efficient layout to use on Android.
Allows for flat view hierarchy
Handles complex layouts efficiently
Supports responsive design
Provides tools for optimizing layouts
Q50. What is Coroutine and Suspend function
Coroutines are a way to perform asynchronous operations in a sequential manner in Kotlin. Suspend functions are functions that can be paused and resumed.
Coroutines in Kotlin are used for asynchronous programming without blocking the main thread.
Suspend functions are used within coroutines to perform long-running tasks without blocking the thread.
Coroutines can be used to handle network requests, database operations, and other asynchronous tasks efficiently.
Example: 'suspend f...read more
Interview Questions of Similar Designations
Top Interview Questions for Senior Android Developer Related Skills
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month