- What is a service in Android ?
- What is the purpose of Service?
- On what thread does the service gets executed ?
- Name different types of services in Android.
- How can we start a service ?
- What are
started
services in Android ? - Describe the lifecycle of a service when applicatio starts.
- Describe the lifecycle of a service when user exits the application
- What are system services ? Can you name some of them ?
- How to communicate with an activity from a service ?
- What is a Forground Service ?
- What does inter-process communication mean ?
- What types of tasks are suitable for delegating to a service ?
- When the Android OS will kill the service ?
- What is the Android process model ?
- What is AIDL file and What does it do ?
- What is the purpose of
ServiceConnection
class ? - What is the difference between
startService()
andstartForegroundService()
? - What is an IntentService ?
- On what thread does the IntentService gets executed on ?
- How would you pass data to an IntentService ?
- How can we make the AlarmService run forever even after device reboot
- What is an alarm service and explain it’s need with real-world example
- How can we make the AlarmService run forever even after device reboot ?
- What is the difference between
startService
andbindService
? - How to pass a callback to a bounded service using AIDL structure ?
- What does
oneway
mean in AIDL syntax ? - What does
in
mean in AIDL syntax ? - How does IntentService works under the hood ?
- Will invoking
unbindService()
stops a bound service ? - Can a service start an activity and vice versa ?
- Can we show a dialog from a service ?
- Can we send a broadcast message from a service ? How about registering a broadcast receiver ?
- Can we inflate a layout from a service ?
- Can we load resource values from a service ?
- Design a music player that shows a now-playing notification, with pause, stop and resume buttons, using a service.
- How to make a service run in another process rather than the activity process ?
- How to start or bind to a service that is running in another process ?
- Design an application with an exported bound service, which other applications can bind to.
- How to protect an exported bound service with custom permission ?