Explain Service and types
Anoniem
A Service is an application component that can perform long-running operations in the background, and it does not provide a user interface. These are the three different types of services: Scheduled , Started , Bound A service is scheduled when an API such as the JobScheduler or WorkManager, launches the service. A service is started when an application component (such as an activity) calls startService(). After service started, it can run in the background indefinitely, even if the component that started it is destroyed. It is stopped by stopService() method. The service can stop itself by calling the stopSelf() method. A service is bound when an application component binds to it by calling bindService(). A bound service offers a client-server interface that allows components to interact with the service, send requests, receive result. The client can unbind the service by calling the unbindService() method. The service cannot be stopped until all clients unbind the service.