Kotlin Mastery
Open main menu
About
Roadmap
Login
Loading...
Service
1
Explain the concept of a Service in Android and describe how it differs from an Activity
2
Describe scenarios where you would use an Android Service instead of a Thread or Coroutine to perform background tasks.
3
Describe the lifecycle of a Service in Android.
4
Explain the difference between a started Service and a bound Service in Android.
5
Describe the process of creating a foreground Service in Android, and explain the scenarios in which it is necessary to use a foreground Service instead of a background Service.
6
Describe the methods for communicating between an Activity and a Service in Android
7
Can you explain the role of the Messenger class in facilitating communication between an Activity and a Service, and provide an example of how it is used?
8
Can you explain how to use AIDL to define a Service interface.
9
How do you optimize Service performance and minimize resource usage in an Android application?
10
How do you handle Service crashes and errors in an Android application?
11
How do you ensure that a service in your Android application is only accessible to your app?
12
Can you explain the purpose of defining a service as a Foreground Service, and how it differs from a normal service?
13
What is the significance of returning START_STICKY from the onStartCommand() method, considering that services are mostly killed after 10 mins?
14
How would you approach starting an Activity from Service?
15
What risks are you facing when you change a Service name during a Refactor?
16
Can user dismiss a Foreground Service Notification?
17
What if the user disallows the Notification permission for your app? Can your app still create a Foreground Service?
18
Can you start a foreground service while the app is in the background?
19
What type of android resources would require a foreground service?