Senior Android Developer

100+ Senior Android Developer Interview Questions and Answers

Updated 1 Dec 2024

Q51. What is the coroutines? Lazy and lateint Sealed classes

Ans.

Coroutines are a way to perform asynchronous programming in a more structured and readable manner in Android development.

  • Coroutines are lightweight threads that can be used to perform long-running tasks without blocking the main thread.

  • They simplify asynchronous programming by allowing developers to write code that looks synchronous, making it easier to understand and maintain.

  • Coroutines can be used for tasks like network requests, database operations, and other IO-bound oper...read more

Q52. Git pull vs pull request?

Ans.

Git pull is used to fetch and merge changes from a remote repository, while pull request is a way to propose changes to a repository.

  • Git pull is used to update a local repository with changes from a remote repository.

  • Pull request is a way to propose changes to a repository by creating a branch, making changes, and requesting the changes to be merged into the main branch.

  • Git pull is a command used in the terminal, while pull request is a feature on Git hosting platforms like G...read more

Q53. Diffr between MVP and MVVM.

Ans.

MVP and MVVM are architectural patterns used in Android development.

  • MVP stands for Model-View-Presenter and separates the presentation layer from the business logic.

  • MVVM stands for Model-View-ViewModel and separates the presentation layer from the data layer.

  • MVP uses a passive view, where the view is dumb and only displays data provided by the presenter.

  • MVVM uses a reactive view, where the view observes changes in the ViewModel and updates itself accordingly.

  • MVP is easier to ...read more

Q54. what is Intent Lifecycle of Fragment

Ans.

Intent is a messaging object used to request an action from another app component.

  • Intent is used to start activities, services, and broadcast receivers in Android.

  • It can also be used to pass data between components.

  • There are two types of intents: explicit intents and implicit intents.

Are these interview questions helpful?

Q55. what is anr how to prevent

Ans.

ANR stands for Application Not Responding, it occurs when the main UI thread is blocked for too long.

  • ANR can be prevented by offloading long-running tasks to background threads or services.

  • Optimizing code and reducing UI thread workload can also help prevent ANR.

  • Using tools like StrictMode can help identify potential ANR issues during development.

Q56. System Design based on android applications

Ans.

System design for android applications involves planning the architecture, components, and interactions of the app.

  • Identify the key features and functionalities of the app

  • Design the user interface and user experience (UI/UX)

  • Choose the appropriate architecture pattern (e.g. MVC, MVP, MVVM)

  • Consider scalability, performance, and security

  • Implement data storage solutions (e.g. SQLite, Room, Firebase)

  • Integrate with external APIs and services

  • Test and optimize the app for different d...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q57. Explain about jet compose

Ans.

Jet Compose is a modern UI toolkit for building native Android apps using a declarative approach.

  • Jet Compose is a declarative UI framework for building Android apps.

  • It allows developers to create UI components using Kotlin code.

  • Jet Compose simplifies UI development by eliminating the need for XML layouts.

  • It provides a more flexible and efficient way to create dynamic UIs.

  • Jet Compose is part of the Jetpack libraries provided by Google.

Q58. Extension function in kotlin

Ans.

Extension functions in Kotlin allow you to add new functions to existing classes without modifying their source code.

  • Extension functions are defined outside of the class they extend.

  • They can be called on instances of the class as if they were regular methods.

  • They can access the properties and methods of the class they extend.

  • Example: fun String.isEmailValid(): Boolean { ... }

  • Example: fun Int.isEven(): Boolean { ... }

Senior Android Developer Jobs

Senior Android Developer - Bangalore 4-9 years
CriticaLog India Private Limited
4.5
Bangalore / Bengaluru
Senior Android Developer 4-8 years
Girmiti Software Pvt. Ltd
4.3
Chennai
Senses Electronics - Senior Android Developer - Java/Kotlin Programming (4-6 yrs) 4-6 years
Senses Electronics
4.7
₹ 9 L/yr - ₹ 18 L/yr

Q59. Null safety in kotlin

Ans.

Null safety in Kotlin ensures that variables cannot hold null values unless explicitly specified.

  • Kotlin uses nullable and non-nullable types to enforce null safety.

  • The '?' operator is used to declare a variable as nullable.

  • Safe call operator '?.' is used to safely access properties or methods of nullable objects.

  • The '!!' operator is used for force unwrapping nullable types, but can lead to NullPointerExceptions.

Q60. Room data base explanation

Ans.

Room database is a persistence library that provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite.

  • Room database simplifies database interactions by providing compile-time verification of SQL queries.

  • It consists of three main components: Entity, DAO (Data Access Object), and Database.

  • Entities represent tables in the database, DAOs define methods to interact with the database, and Database is the main access...read more

Q61. Sealed claa in kotlin

Ans.

Sealed classes in Kotlin are used to represent restricted class hierarchies.

  • Sealed classes can have a limited set of subclasses defined within the same file.

  • They are useful for representing a fixed set of types in a hierarchy.

  • Sealed classes are often used in when expressions for exhaustive checks.

Q62. recyclerview practical impl with itemview

Ans.

RecyclerView is used to display large sets of data efficiently. ItemView is used to define the layout of each item in the list.

  • RecyclerView is a more advanced version of ListView and GridView

  • ItemView is a layout file that defines the UI for each item in the list

  • RecyclerView.Adapter is used to bind the data to the views

  • RecyclerView.LayoutManager is used to define the layout of the RecyclerView

  • RecyclerView.ViewHolder is used to hold the views for each item in the list

Q63. What is Concurrency Design Pattern?

Ans.

Concurrency design pattern is a design pattern that deals with managing multiple tasks or processes simultaneously.

  • Concurrency design patterns help in improving performance and efficiency in multi-threaded applications.

  • Examples of concurrency design patterns include Producer-Consumer, Reader-Writer, and Thread Pool.

  • These patterns help in avoiding issues like race conditions, deadlocks, and resource contention.

Q64. How does a viewmodel work internally

Ans.

A viewmodel is a class that stores and manages UI-related data in a lifecycle-conscious way.

  • Viewmodel survives configuration changes like screen rotations

  • It is not destroyed when the activity is destroyed

  • It is typically used to hold data for the UI to display

Q65. Coroutine in Kotlin, Clean architecture etc

Ans.

Coroutines in Kotlin are used for asynchronous programming, while Clean Architecture is a software design pattern that separates concerns.

  • Coroutines in Kotlin allow for asynchronous programming without the need for callbacks or complex threading mechanisms.

  • Clean Architecture is a software design pattern that separates the application into layers, such as presentation, domain, and data, to improve maintainability and testability.

  • Combining coroutines with Clean Architecture can...read more

Q66. Find the anagram of small string into large string

Ans.

Check if an anagram of a small string exists in a large string

  • Create a frequency map of characters in the small string

  • Iterate through the large string and check if a substring of the same length has the same frequency map

  • Return true if an anagram is found, false otherwise

Q67. Find the length of array with unique items

Ans.

Count the number of unique items in an array of strings

  • Create a Set to store unique items

  • Iterate through the array and add each item to the Set

  • Return the size of the Set as the length of the array with unique items

Q68. Types of job in kotlin coroutine

Ans.

Types of jobs in Kotlin coroutine include launch, async, withContext, and runBlocking.

  • launch: starts a new coroutine without blocking the current thread

  • async: starts a new coroutine and returns a Deferred object with a result

  • withContext: switches the coroutine context within a coroutine

  • runBlocking: blocks the current thread until the coroutine inside it is completed

Q69. What is high order function?

Ans.

A high order function is a function that can take other functions as parameters or return functions as results.

  • High order functions can be used to create more flexible and reusable code.

  • They allow for functions to be passed as arguments, making code more modular.

  • Examples include map, filter, and reduce functions in functional programming.

Q70. difference between remember and rememberSaveable

Ans.

remember is used to store a value in a composable function, while rememberSaveable is used to store a value that survives configuration changes.

  • remember is used to store a value that does not survive configuration changes

  • rememberSaveable is used to store a value that survives configuration changes, such as rotation of the device

  • rememberSaveable is typically used for storing view model data in Jetpack Compose

Q71. What is activity vs fragment

Ans.

Activity is a single screen with a user interface, while Fragment is a modular section of an activity.

  • Activity represents a single screen with a user interface.

  • Fragment is a modular section of an activity that can be combined with other fragments to create a multi-pane UI.

  • Activities are used to handle user interactions and manage the lifecycle of an app.

  • Fragments are reusable components that can be added or removed from an activity dynamically.

  • Activities are typically used fo...read more

Q72. What is suspend function

Ans.

A suspend function is a function that can be paused and resumed later without blocking the main thread.

  • Suspend functions are used in Kotlin coroutines to perform asynchronous operations.

  • They are defined using the 'suspend' keyword.

  • Suspend functions can only be called from other suspend functions or from coroutine scopes.

  • They can be used to perform network requests, database operations, or any other long-running tasks without blocking the main thread.

  • Suspend functions can be u...read more

Q73. If Flow lifecycle aware

Ans.

Flow lifecycle aware means using Kotlin Flow with lifecycle awareness in Android development.

  • Flow lifecycle aware helps manage data streams in Android apps

  • It ensures that data emissions are only observed when the lifecycle is in the appropriate state

  • Example: Using Flow with LiveData to update UI components based on lifecycle events

Q74. what is Higher order function

Ans.

Higher order function is a function that can take other functions as parameters or return functions as results.

  • Higher order functions can be passed as arguments to other functions.

  • Higher order functions can return functions as results.

  • Examples include map, filter, and reduce functions in functional programming.

Q75. what is inline keyword

Ans.

The inline keyword is used in Kotlin to suggest that a function should be inlined at the call site.

  • Used to eliminate the overhead of function calls by copying the function code directly at the call site

  • Helps in improving performance by reducing the function call overhead

  • Should be used for small functions or lambdas to avoid unnecessary function call overhead

Q76. Life cycle of android activity

Ans.

The life cycle of an Android activity refers to the sequence of states an activity goes through during its lifetime.

  • An activity is created with onCreate()

  • It becomes visible with onStart()

  • It becomes interactive with onResume()

  • It goes to the background with onPause()

  • It is stopped with onStop()

  • It is destroyed with onDestroy()

  • It can be recreated with onRestart()

  • Configuration changes can trigger different methods like onConfigurationChanged()

  • The activity can also be killed by the ...read more

Q77. name types on collections in Kotlin

Ans.

Kotlin provides several types of collections, including arrays and lists, to store and manipulate data.

  • Kotlin arrays are fixed-size collections that store elements of the same type.

  • Kotlin lists are dynamic-size collections that can store elements of different types.

  • To create an array of strings in Kotlin, you can use the Array type.

  • Alternatively, you can use the shortcut syntax StringArray.

  • Example: val names: Array = arrayOf("John", "Jane", "Alice")

Q78. What is Mvvm architechure?

Ans.

MVVM architecture is a design pattern that separates the user interface from the business logic in an Android app.

  • Model represents the data and business logic

  • View displays the UI and interacts with the user

  • ViewModel acts as a mediator between the Model and View, handling communication and logic

Q79. Explain about MVVM

Ans.

MVVM is an architectural pattern used in software development, particularly in Android apps, to separate the user interface from the business logic.

  • 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 user interactions and updating the Model

  • MVVM helps in separating concerns, making code more modular and easier ...read more

Q80. Different Types of Intent

Ans.

Different types of Intent in Android are explicit and implicit intents.

  • Explicit Intent: Used to start a specific component within the same application.

  • Implicit Intent: Used to request an action from another app component.

  • Example: Explicit Intent - startActivity(new Intent(this, SecondActivity.class));

  • Example: Implicit Intent - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.example.com"));

Q81. What is fragment and uses.

Ans.

Fragments are modular sections of an activity's user interface, allowing for more flexible and dynamic UI designs.

  • Fragments can be reused across multiple activities

  • They help in creating responsive UIs for different screen sizes

  • Fragments can be added or removed dynamically during runtime

  • They are useful for implementing multi-pane layouts on tablets

Q82. Unit testing with example of code

Ans.

Unit testing is a software testing method where individual units or components of a software are tested in isolation.

  • Unit testing helps in identifying bugs early in the development process.

  • It ensures that each unit of code works correctly on its own.

  • Unit tests are typically written using testing frameworks like JUnit or Mockito.

  • Example: Testing a function that calculates the sum of two numbers.

Q83. Service and Types of Service

Ans.

Services in Android are components that run in the background to perform long-running operations.

  • There are two types of services in Android: Started Services and Bound Services.

  • Started Services are used for tasks that need to run independently of an activity, such as playing music in the background.

  • Bound Services are used to interact with other components in the application, such as activities or fragments.

  • Services can be started using startService() method and stopped using ...read more

Q84. How Coroutine work internally

Ans.

Coroutines are lightweight threads that can be suspended and resumed, allowing for asynchronous programming in a sequential manner.

  • Coroutines are implemented using suspend functions and can be launched using 'launch' or 'async' builders.

  • They are based on the concept of continuation passing style, where the state of the function is saved and can be resumed later.

  • Coroutines can be used to perform long-running tasks without blocking the main thread, improving app performance.

  • The...read more

Q85. How to work Jetpack compose

Ans.

Jetpack Compose is a modern Android UI toolkit for building native UIs using a declarative approach.

  • Jetpack Compose allows developers to build UI components using a composable function approach.

  • It simplifies UI development by providing a reactive programming model.

  • Jetpack Compose is fully integrated with existing Android views and layouts.

  • It supports theming, animations, and state management out of the box.

Q86. Explain Activity lifecycle methods.

Ans.

Activity lifecycle methods are a set of methods that are called at different stages of an activity's life cycle.

  • onCreate() - called when the activity is first created

  • onStart() - called when the activity is becoming visible to the user

  • onResume() - called when the activity will start interacting with the user

  • onPause() - called when the activity is going into the background, but still visible

  • onStop() - called when the activity is no longer visible to the user

  • onDestroy() - called...read more

Q87. Non Cancelable context in kotlin

Ans.

Non cancelable context in Kotlin ensures that a task cannot be cancelled once it has started.

  • Non cancelable context is used when you want to ensure that a task completes without being cancelled.

  • It is commonly used in scenarios where cancelling a task midway could lead to data corruption or inconsistent state.

  • An example of non cancelable context is using a coroutine with SupervisorJob to ensure that child coroutines are not cancelled if one of them fails.

Q88. MVVM design pattern

Ans.

MVVM is a design pattern that separates UI logic from business logic.

  • MVVM stands for Model-View-ViewModel

  • Model represents the data and business logic

  • View represents the UI components

  • ViewModel acts as a mediator between Model and View

  • ViewModel exposes data to the View through Observables

  • MVVM helps in writing modular, testable and maintainable code

Q89. Drawback of Compose UI

Ans.

One drawback of Compose UI is the learning curve for developers transitioning from XML-based layouts.

  • Learning curve for developers transitioning from XML layouts

  • Limited resources and documentation compared to traditional Android UI toolkit

  • Compatibility issues with older devices and versions of Android

Q90. What is Andorid Structure.

Ans.

Android Structure refers to the organization of components in an Android application.

  • Android Structure consists of Activities, Fragments, Services, Broadcast Receivers, and Content Providers.

  • Activities represent the UI of the application and handle user interactions.

  • Fragments are reusable UI components that can be combined within an Activity.

  • Services perform background tasks independently of the UI.

  • Broadcast Receivers respond to system-wide broadcast announcements.

  • Content Pro...read more

Q91. write code for synchronise threads

Ans.

Synchronizing threads in Android can be achieved using synchronization blocks or methods.

  • Use synchronized keyword to create a synchronized block or method

  • Use locks such as ReentrantLock for more complex synchronization needs

  • Consider using synchronized collections like ConcurrentHashMap for thread-safe data structures

Q92. Conceptual work flow of concepts

Ans.

Conceptual work flow of concepts involves understanding the flow of ideas and processes in a systematic manner.

  • Identify key concepts and their relationships

  • Map out the sequence of events or steps

  • Consider dependencies and interactions between concepts

  • Visualize the flow using diagrams or charts

Q93. arraylist vs linklist

Ans.

ArrayList is faster for accessing elements, while LinkedList is better for frequent insertions and deletions.

  • ArrayList uses an array to store elements, allowing for fast random access but slower insertions and deletions.

  • LinkedList uses nodes with references to the next and previous elements, making insertions and deletions faster but access slower.

  • For example, if you need to frequently add or remove elements in the middle of a list, LinkedList would be more efficient.

Q94. Threading and its method

Ans.

Threading in Android allows multiple tasks to run concurrently, improving performance and responsiveness.

  • Threading can be implemented using classes such as AsyncTask, Handler, and Thread.

  • AsyncTask is used for short background tasks that need to update the UI, while Handler is used for communication between threads.

  • Thread is a low-level way to create a new thread for longer background tasks.

  • Care must be taken to avoid memory leaks and ensure thread safety when working with thr...read more

Q95. what is marker interface

Ans.

Marker interface is an interface with no methods, used to mark a class for special treatment.

  • Marker interfaces are used to provide metadata about the class.

  • They do not have any methods to implement.

  • Examples include Serializable interface in Java.

Q96. How Paging work?

Ans.

Paging in Android is a technique used to load and display large data sets efficiently by loading data in chunks.

  • Paging library handles loading data in chunks from a data source, typically a database or network.

  • It uses a PagedListAdapter to display data in a RecyclerView, loading more data as the user scrolls.

  • Paging library also supports placeholders for loading and error states, improving user experience.

  • Paging library can be customized with boundary callbacks to trigger acti...read more

Q97. jetpack compose detail?

Ans.

Jetpack Compose is a modern Android UI toolkit for building native UIs using a declarative approach.

  • Jetpack Compose allows developers to build UI components using a composable function approach.

  • It simplifies UI development by providing a reactive programming model.

  • Jetpack Compose is fully integrated with existing Android APIs and can be used alongside traditional XML-based layouts.

  • It offers a more efficient way to create dynamic and interactive user interfaces compared to the...read more

Q98. Explain the Agail methodology

Ans.

Agile methodology is a project management approach that emphasizes flexibility, collaboration, and iterative development.

  • Agile methodology focuses on delivering working software in short, iterative cycles called sprints.

  • It values customer collaboration and responding to change over following a strict plan.

  • Key principles include individuals and interactions over processes and tools, working software over comprehensive documentation, customer collaboration over contract negotia...read more

Q99. What is UI thread?

Ans.

UI thread is the main thread in Android responsible for handling user interface interactions.

  • UI thread is also known as the main thread in Android.

  • It is responsible for handling user interface interactions such as drawing views, handling touch events, and updating UI components.

  • Performing long-running tasks on the UI thread can lead to UI freezes and unresponsiveness.

  • To perform background tasks and prevent blocking the UI thread, developers should use AsyncTask, Handlers, or ...read more

Q100. Aidl what its use

Ans.

AIDL (Android Interface Definition Language) is used in Android development to define the interface between client and service components in different processes.

  • AIDL allows communication between different Android components running in separate processes.

  • It is commonly used in creating bound services in Android applications.

  • AIDL files define the methods that can be called remotely by other components.

Previous
1
2
3
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10k Interviews
3.7
 • 7.3k Interviews
3.8
 • 5.4k Interviews
3.8
 • 4.6k Interviews
3.6
 • 3.7k Interviews
3.7
 • 507 Interviews
3.9
 • 161 Interviews
View all

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

Senior Android Developer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter