Nykaa
Lahori Zeera Interview Questions and Answers
Q1. 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
Q2. 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.
Q3. 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
Q4. 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
Q5. 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
Q6. 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.
Reviews
Interviews
Salaries
Users/Month