Ola Electric Mobility
Soumi's Herbal Products Interview Questions and Answers
Q1. Lifecycle of activity. What would be the state if app is running in the background. When it will be in onStop and onRestart state?
The app lifecycle includes states like running in the background, onStop, and onRestart.
App running in the background: When the app is not visible but still running, it is in the background state.
onStop state: Occurs when the activity is no longer visible to the user.
onRestart state: Follows onStop and is called when the activity is being re-displayed to the user.
Q2. How many ways we can share data between one app to another app?
There are multiple ways to share data between apps, including using intents, content providers, broadcast receivers, and shared preferences.
Using Intents: Allows apps to send and receive data through an Intent object.
Content Providers: Enable apps to share data with other apps by exposing a structured set of data through a URI.
Broadcast Receivers: Apps can send broadcasts to other apps to share data or events.
Shared Preferences: Apps can store and retrieve key-value pairs to ...read more
Q3. How we can perform background tasks in Android?
Background tasks in Android can be performed using services, AsyncTask, JobScheduler, or WorkManager.
Use Services for long-running tasks in the background
AsyncTask for short background tasks that need to interact with the UI
JobScheduler for deferrable background tasks that require network connectivity
WorkManager for tasks that need to run reliably across different Android versions
Q4. What is AIDL in Android development?
AIDL stands for Android Interface Definition Language, used for inter-process communication in Android development.
AIDL is a tool used to define the programming interface that clients and servers use to communicate with each other in Android.
It allows different Android components to communicate with each other across different processes.
AIDL files define the methods that can be called remotely, along with the data types that can be passed.
Q5. Difference between Threads and Coroutines.
Threads are independent sequences of execution within a process, while coroutines are cooperative routines that can pause and resume.
Threads are managed by the operating system, while coroutines are managed by the programmer.
Threads run concurrently and can execute in parallel on multiple cores, while coroutines are typically single-threaded.
Threads have their own stack and memory space, while coroutines share the same stack and memory space.
Threads are preemptive, meaning th...read more
Q6. What is a service?
A service is a piece of code that performs specific tasks or functions to support the overall functionality of a software application.
Services are often used for tasks such as data processing, communication with external systems, or background tasks.
Examples of services include web services, REST APIs, and microservices.
Services can run independently of the user interface and can be accessed by multiple components within an application.
Q7. Intersection of Linked list
Intersection of two linked lists is finding the common node(s) between them.
Traverse both lists and compare each node to find the common node(s).
Use a hash table to store the nodes of one list and check for their presence in the other list.
Calculate the length of both lists and move the pointer of the longer list to match the length of the shorter list, then compare each node.
Q8. Sort and Merge two linked list
Sort and merge two linked lists
Traverse both linked lists simultaneously
Compare the values of nodes and merge them in sorted order
Handle cases where one list is longer than the other
Interview Process at Soumi's Herbal Products
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month