Find the best answer to your question, help others answer theirs

If you are going to use a passage of Lorem Ipsum, you need to be sure there
isn't anything embarrassing hidden in the middle of text.

  • Anybody can ask a question
  • Anybody can answer
  • The best answers are voted up and rise to the top
Describe services in android
Asked 5 years ago
Active 3 months ago
Viewed 575 times

1 Answer

2

A Service is an application component that can perform long-running operations in the background, and it doesn't provide a user interface. It can run in the background, even when the user is not interacting with your application. These are the three different types of services:

Foreground Service: A foreground service performs some operation that is noticeable to the user. For example, we can use a foreground service to play an audio track. A Notification must be displayed to the user.

Background Service: A background service performs an operation that isn’t directly noticed by the user. In Android API level 26 and above, there are restrictions to using background services and it is recommended to use WorkManager in these cases.

Bound Service: 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 results. A bound service runs only as long as another application component is bound to it.

Edit
avatar
Majed Badawi
15.5k 3 10 26
answered 8 hours ago

Leave a Comment

[named hyperlinks] (https://example.com)
**bold**
_italic_

Your Answer

Drop files here or click to upload.