Senior Android Developer
100+ Senior Android Developer Interview Questions and Answers
Q1. Binary Array Sorting Problem Statement
You are provided with a binary array, i.e., an array containing only 0s and 1s. Your task is to sort this binary array and return it after sorting.
Input:
The first line ...read more
Yes, the binary array sorting problem can be solved in linear time and constant space by using a two-pointer approach.
Use two pointers, one starting from the beginning of the array and the other starting from the end.
Swap 0s to the left side and 1s to the right side by incrementing and decrementing the pointers accordingly.
Continue this process until the two pointers meet in the middle of the array.
Example: Input: [1, 0, 1, 0, 1], Output: [0, 0, 1, 1, 1]
Q2. Maximum Subarray Sum Problem Statement
Given an array arr
of length N
consisting of integers, find the sum of the subarray (including empty subarray) with the maximum sum among all subarrays.
Explanation:
A sub...read more
Find the sum of the subarray with the maximum sum among all subarrays in a given array.
Iterate through the array and keep track of the maximum sum subarray encountered so far.
Use Kadane's algorithm to efficiently find the maximum subarray sum.
Consider the case where all elements in the array are negative.
Handle the case where the array contains only one element.
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
Q4. 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
ViewModel in Android is a class that is responsible for preparing and managing data for an activity or fragment.
ViewModel is part of the Android Architecture Components and is used to store and manage UI-related data in a lifecycle-conscious way.
It survives configuration changes such as screen rotations and retains data during the lifecycle of the activity or fragment.
ViewModel should never hold a reference to a view or any class that has a reference to the activity context t...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 🌟
Q7. 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
Q8. 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
Senior Android Developer Jobs
Q9. 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
Q10. 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
RecyclerView is a flexible view for providing a limited window into a large data set.
RecyclerView recycles views to improve performance and memory usage.
It uses a LayoutManager to organize and position items within the view.
Adapter provides data to be displayed in the RecyclerView.
ItemDecoration allows for custom drawing of item decorations like borders or dividers.
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. What are the reasons for using that, and what are its pros and cons?
Using dependency injection in Android development can improve code maintainability and testability.
Pros: easier to manage dependencies, promotes code reusability, facilitates unit testing
Cons: initial setup can be complex, may introduce overhead in smaller projects
Example: Using Dagger 2 for dependency injection in an Android project
Q17. What is the output of the program when the expression is evaluated as 0 divided by 7?
The output of the program when 0 is divided by 7 is 0.
Division of 0 by any number results in 0.
In programming languages, dividing by 0 usually results in an error or undefined behavior.
Q18. 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
Q19. 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)
Q20. 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
Q21. 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
Q22. What are the concepts of threads in Java?
Threads in Java allow for concurrent execution of code, enabling multitasking and improving performance.
Threads are lightweight sub-processes within a process.
They allow for concurrent execution of code, enabling multitasking.
Threads share the same memory space, allowing for efficient communication and data sharing.
Examples include creating threads using the Thread class or implementing the Runnable interface.
Q23. 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
Q24. What are coroutines, scope functions, and visibility modifiers?
Coroutines, scope functions, and visibility modifiers are key concepts in Kotlin programming for Android development.
Coroutines are a way to perform asynchronous programming in a sequential manner. They allow for non-blocking operations.
Scope functions are functions that allow you to execute a block of code within the context of an object. Examples include 'let', 'apply', 'run', 'also', and 'with'.
Visibility modifiers control the visibility of classes, interfaces, functions, ...read more
Q25. What is the MVVM (Model-View-ViewModel) architectural pattern?
MVVM is an architectural pattern that separates the user interface from the business logic and data handling in Android development.
Model represents the data and business logic of the application.
View is responsible for displaying the UI elements and sending user interactions to the ViewModel.
ViewModel acts as a mediator between the Model and the View, handling the communication and data flow.
MVVM helps in achieving separation of concerns, making code more modular and easier ...read more
Q26. 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.
Q27. 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
Q28. 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
Q29. 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
Q30. 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
Q31. 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
Q32. Volatile keyword uses, refied keyword and its use in generics
Volatile keyword ensures visibility of changes to variables across threads. Reified keyword is used to access type information at runtime in generics.
Volatile keyword is used to indicate that a variable's value will be modified by different threads.
It ensures that changes made by one thread to a volatile variable are visible to other threads.
Reified keyword is used in generics to access type information at runtime, which is not possible with regular generics due to type erasu...read more
Q33. 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
Q34. 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.
Q35. 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
Q36. What are the different types of interfaces?
Different types of interfaces include user interfaces, hardware interfaces, and software interfaces.
User interfaces: allow users to interact with the system, such as graphical user interfaces (GUI) and command-line interfaces (CLI)
Hardware interfaces: connect hardware components to the system, such as USB, HDMI, and Ethernet ports
Software interfaces: define how software components interact with each other, such as application programming interfaces (APIs) and network protocol...read more
Q37. 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.
Q38. 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
Q39. 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
Q40. 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.
Q41. 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
Q42. What is FnO and how did you implement the feature?
FnO stands for Futures and Options, a type of financial derivative. Implemented feature by integrating real-time market data and enabling users to trade contracts.
FnO is a type of financial derivative where parties agree to buy or sell an asset at a specified price on a future date.
Implemented feature by integrating real-time market data feeds to provide up-to-date information on contract prices.
Enabled users to trade futures and options contracts through the app, with featur...read more
Q43. Multi module architecture in android pros and cons
Multi module architecture in Android involves breaking down an app into multiple modules for better organization and scalability.
Pros: better organization, easier maintenance, faster build times, code reusability
Cons: increased complexity, potential for dependency issues, learning curve for developers
Example: Breaking down an app into separate modules for UI, networking, and data storage can make it easier to work on different parts of the app independently.
Q44. 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
Q45. 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.
Q46. 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 }
Q47. 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
Q48. 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).
Q49. 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
Q50. 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.
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