Android Developer
500+ Android Developer Interview Questions and Answers

Asked in Hike

Use a thread pool to handle parallel API calls efficiently.
Implement a thread pool to manage multiple threads for downloading images concurrently.
Use a caching mechanism to store downloaded images and avoid redundant API calls.
Consider using a priority queue to prioritize important images for download.
Implement a mechanism to cancel or pause ongoing downloads if needed.
Optimize network requests by batching multiple requests together.

Asked in DAZN

Q. Do you handle the code repos and what are the third party libraries are used in your past experience.
Yes, I have experience in handling code repos and have used various third-party libraries.
I have experience in using Git for version control and have managed code repositories on GitHub and Bitbucket.
I have used third-party libraries such as Retrofit, OkHttp, Gson, and Picasso for network operations, JSON parsing, and image loading respectively.
I have also used libraries like ButterKnife and Dagger for dependency injection and RxJava for reactive programming.
I make sure to ke...read more

Asked in Hike

Q. Design a weather app that displays an image for each weather condition, with images stored on a server. Address handling partially downloaded images and minimizing user data consumption.
A weather app that displays images for different weather conditions, taking care of half downloaded images and minimizing data consumption.
Implement image caching to store downloaded images locally
Check if the image is already downloaded before making a network request
Use a progress bar to indicate the download status of the image
Handle cases where the download is interrupted or incomplete
Implement a mechanism to resume the download from where it left off
Optimize image loadin...read more

Asked in Accenture

Q. What is a marker interface, and when and where should interfaces be used?
Marker interface is an empty interface used to mark a class as having a particular property or behavior.
Marker interface has no methods or fields, it is used to provide metadata to the code.
It is used to indicate that a class has a certain capability or should be treated in a special way.
Examples of marker interfaces are Serializable, Cloneable, and Remote.
Interfaces are used to achieve abstraction and provide a contract for implementing classes.
Interfaces are used to achieve...read more

Asked in Perfisys

Q. Explain the usage of Fragments in Android and when you might prefer using them over Activities.
Fragments are reusable UI components in Android that can be used within activities. They are preferred over activities in certain scenarios.
Fragments allow for modular and reusable UI components.
They can be used to create multi-pane layouts for tablets and larger screens.
Fragments can be added or removed dynamically at runtime.
They can retain their state during configuration changes.
Fragments can communicate with each other and with the hosting activity using interfaces.

Asked in Hike

Different launch modes for activities in Android control how the activity is launched and how it interacts with the existing activities in the back stack.
Standard: The default launch mode where a new instance of the activity is created every time it is launched.
SingleTop: If the activity is already at the top of the back stack, it will not be recreated and onNewIntent() will be called instead.
SingleTask: The activity will have a unique instance in the back stack, and if it is...read more
Android Developer Jobs




Asked in Paytm

Q. How do you set equal spacing between children of a ConstraintLayout?
To set equal spacing between childs of constraint layout, use the chain style property.
Create a chain of the views that need equal spacing using the chain style property.
Set the chain style to spread inside the constraint layout.
Adjust the margins of the views to control the spacing.
Use the layout_constraintHorizontal_chainStyle or layout_constraintVertical_chainStyle attribute to set the chain style.
Example: app:layout_constraintHorizontal_chainStyle="spread"

Asked in Perfisys

Q. What is the difference between Serializable and Parcelable?
Serializable is a marker interface that allows objects to be converted into a byte stream, while Parcelable is an Android-specific interface for efficient object serialization.
Serializable is a standard Java interface, while Parcelable is an Android-specific interface.
Serializable uses reflection to serialize and deserialize objects, which can be slower and less efficient.
Parcelable requires explicit implementation of methods for serialization and deserialization, making it f...read more
Share interview questions and help millions of jobseekers 🌟
Asked in Dot-com Infotech

Q. How much do you know about database? MySQL or SQL Server?
I have a strong understanding of databases, including MySQL and SQL Server.
I am proficient in writing SQL queries and managing databases.
I have experience in designing and implementing database schemas.
I am familiar with database optimization techniques.
I have worked with both MySQL and SQL Server in various projects.
I understand the differences between the two and can work with either one.

Asked in Hike

Inter-Process Communication (IPC) mechanisms in Android OS allow different processes to communicate with each other.
Binder: High-performance mechanism for IPC between processes in Android. Used for communication between system services and applications.
Intent: Used for communication between components within the same application or between different applications.
Content Providers: Allow different applications to share data through a common interface.
Broadcast Receivers: Used ...read more

Asked in Hike

Deep links are URLs that take users directly to specific content within an app, while app links are URLs that open an app if it's installed, or redirect to a website if not.
Deep links are used to navigate users to a specific location within an app, bypassing the home screen.
App links are URLs that can open an app if it's installed on the device, or redirect to a website if the app is not installed.
Deep links require specific handling in the app to properly navigate to the des...read more

Asked in DevRev Inc

Q. Given an in-out time log of viewers, how would you find the highest count of viewers at any given point?
To find highest count of viewers at any given point from in-out time log
Create an array of time slots with start and end time
Loop through the log and increment the count for each time slot
Track the maximum count and corresponding time slot
Return the time slot with highest count

Asked in Brainvire

Q. What is OOPS and why is it important?
OOPS stands for Object-Oriented Programming System. It is a programming paradigm that uses objects to represent real-world entities.
OOPS allows for modular and reusable code.
It provides a clear structure and organization to the code.
Encapsulation, inheritance, and polymorphism are key concepts in OOPS.
Example: In an Android app, each screen can be represented as an object with its own properties and behaviors.
OOPS promotes code reusability and maintainability.

Asked in GlobalLogic

Q. How can memory leaks be avoided and identified?
Memory leakage can cause app crashes and slow performance. It can be avoided by proper memory management and identifying the root cause.
Avoid creating unnecessary objects
Release unused resources
Use memory profiling tools like Android Profiler
Avoid static references to objects
Use weak references when necessary

Asked in Oliveboard

Q. What is the difference between an ANR dialog and an app crash dialog, and what are their respective scenarios?
ANR dialog indicates unresponsiveness, while app crash dialog shows an unexpected termination of the app.
ANR (Application Not Responding) occurs when the UI thread is blocked for too long (usually 5 seconds).
Example of ANR: Long-running operation on the main thread, like a network call or heavy computation.
App crash dialog appears when the app encounters an unhandled exception or fatal error.
Example of app crash: NullPointerException due to accessing an object that hasn't bee...read more

Asked in Webandcrafts

Q. What is Dependency Injection, and how does Hilt facilitate its implementation in Android development?
Dependency Injection is a design pattern where components are given their dependencies rather than creating them.
Hilt is a dependency injection library for Android that simplifies the implementation of DI in Android apps.
Hilt generates the necessary classes for DI at compile time, reducing boilerplate code.
Hilt provides annotations like @HiltAndroidApp, @AndroidEntryPoint, and @Inject to facilitate DI in Android development.

Asked in Sasken

Q. Explain ViewModel and how it handles configuration changes.
ViewModel retains UI-related data during configuration changes, ensuring a seamless user experience in Android apps.
ViewModel is part of Android Architecture Components, designed to store and manage UI-related data.
It survives configuration changes like screen rotations, preventing data loss.
Example: If a user is filling out a form and the screen rotates, the ViewModel retains the form data.
ViewModel is lifecycle-aware, meaning it only exists as long as the associated UI cont...read more

Asked in Hike

Q. What are the different Android components and concepts such as RecyclerView, ViewModel, ANR, and how do they function internally?
Android components like Recycler View, View Model, ANR are essential for building robust Android applications.
Recycler View: Efficient way to display large data sets by recycling views as they scroll off the screen.
View Model: Manages UI-related data in a lifecycle-conscious way, surviving configuration changes.
ANR (Application Not Responding): Dialog shown to the user when the main thread of an app is blocked for too long.
Understanding how these components work internally is...read more
Asked in Gantec Publishing Solutions

Q. 1)what is difference between abstract class and interface 2)how can you create JDBC application for saving the data
Answering questions on abstract class vs interface and creating JDBC application for data saving.
Abstract class can have method implementations while interface cannot
A class can implement multiple interfaces but can only inherit from one abstract class
JDBC application can be created by loading the driver, establishing connection, creating statement, executing query and closing connection
Example: Class.forName("com.mysql.jdbc.Driver"); Connection con=DriverManager.getConnectio...read more

Asked in Cognizant

Q. What are coroutine, how to secure ur app data, network call in android , ssl pinning, notification's implementation through FCM, android basic questions
Coroutines are a way to perform asynchronous operations in Android, securing app data involves encryption, SSL pinning enhances security, FCM for notifications.
Coroutines are used for managing asynchronous operations in Android, allowing for efficient and non-blocking code execution.
Securing app data involves using encryption techniques such as AES to protect sensitive information from unauthorized access.
SSL pinning is a security measure that ensures the app only communicate...read more

Asked in Lava International

Q. How do you determine what features people want in a phone?
To know what things people want from a phone, conduct market research, analyze user feedback, track industry trends, and consider user demographics.
Conduct market research to understand consumer preferences
Analyze user feedback from reviews, surveys, and forums
Track industry trends and technological advancements
Consider user demographics and their specific needs
Examples: larger battery life, better camera quality, faster performance
Asked in Code Vyasa

Q. On which lifecycle event is the view attached to the Fragment?
The view is attached to the Fragment during the onAttach() lifecycle event.
The onAttach() method is called when the Fragment is associated with its host Activity.
This is the first lifecycle method called after the Fragment is created.
The onAttach() method receives the Activity as a parameter, allowing the Fragment to interact with its host.

Asked in Perfisys

Q. Describe the differences between AsyncTask and RxJava for handling background tasks in Android.
AsyncTask is a built-in class for handling background tasks in Android, while RxJava is a library that provides a more flexible and powerful approach.
AsyncTask is a class provided by the Android framework, while RxJava is a third-party library.
AsyncTask is based on the traditional thread and callback model, while RxJava uses the concept of Observables and allows for more complex asynchronous operations.
RxJava provides operators that can be used to transform, filter, and combi...read more

Asked in Sasken

Q. What are the advantages of Kotlin over Java?
Kotlin offers modern features, improved syntax, and enhanced safety compared to Java, making Android development more efficient.
Null Safety: Kotlin's type system distinguishes between nullable and non-nullable types, reducing NullPointerExceptions. Example: 'var name: String? = null'.
Concise Syntax: Kotlin reduces boilerplate code. For instance, data classes automatically generate getters, setters, and toString methods.
Extension Functions: Kotlin allows adding new functions t...read more

Asked in BYLD Group

Q. What are coroutines in Kotlin, and how do they differ from AsyncTask and WorkManager?
Coroutines in Kotlin are lightweight threads that help manage asynchronous tasks efficiently.
Coroutines are more efficient than AsyncTask as they can handle multiple tasks concurrently without creating new threads.
Coroutines are more flexible and easier to use compared to AsyncTask.
Coroutines can be easily cancelled, unlike AsyncTask which can lead to memory leaks if not handled properly.
WorkManager is recommended for background tasks that need to be guaranteed to run, while ...read more

Asked in Lumen Technologies

Q. What is the difference between MVVM (Model-View-ViewModel) and MVC (Model-View-Controller) architectural patterns?
MVVM separates the view and model using a ViewModel, while MVC separates the view and model using a controller.
In MVVM, the ViewModel acts as an intermediary between the view and model, handling user interactions and updating the model accordingly.
In MVC, the controller is responsible for handling user input, updating the model, and updating the view.
MVVM allows for better separation of concerns and easier unit testing of the ViewModel.
MVC can lead to tighter coupling between...read more

Asked in Accenture

Q. Why do we prefer ConstraintLayout?
Constraint layout is preferred for its flexibility and efficiency.
Allows for complex layouts with minimal nesting
Supports responsive design and animations
Reduces the need for nested layouts
Improves performance by reducing layout hierarchy
Easier to maintain and update layouts
Compatible with Android Studio's Layout Editor

Asked in Zypp Electric

Q. What is the difference between ConstraintLayout and RelativeLayout?
Constraint layout is more flexible and efficient than relative layout.
Constraint layout allows for complex layouts with fewer nested views.
It uses constraints to position and size views relative to other views or parent layout.
Relative layout positions views relative to each other or parent layout using attributes like 'above', 'below', etc.
Constraint layout is recommended for complex layouts with many views.
Relative layout is recommended for simple layouts with few views.
Asked in Gantec Publishing Solutions

Q. They asked basic Java questions and about your ability to quickly learn new technologies.
I have a solid foundation in Java and a strong ability to quickly learn new technologies, adapting to project needs efficiently.
Proficient in Java fundamentals: OOP concepts, data structures, and exception handling.
Experience with Android SDK and libraries like Retrofit for networking.
Quick learner: adapted to Kotlin for Android development in a week.
Familiar with version control systems like Git, enabling collaboration.
Engaged in continuous learning through online courses an...read more

Asked in TCS

Q. How do you share an Android project with a client?
The project can be shared with the client through various methods such as email, cloud storage, or version control systems.
Create a build of the project
Upload the build to a cloud storage service such as Dropbox or Google Drive
Share the link to the build with the client
Use a version control system such as Git to share the project with the client
Provide instructions on how to build and run the project
Interview Questions of Similar Designations
Interview Experiences of Popular Companies





Top Interview Questions for Android Developer Related Skills

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

