Bound service (#24052)

According to the android guideline there are there services type and I added the bound service to this document to make it compatible with latest android guideline
This commit is contained in:
Ishan Udeshka Fernando
2018-10-23 00:31:47 +05:30
committed by Randell Dawson
parent b40aa9c718
commit 18a012e656

View File

@ -95,10 +95,11 @@ public class MainActivity extends Activity {
## [Services](https://developer.android.com/guide/components/services)
A _service_ is a component without user interface to perform long-running operations in the background.
There are two kinds of services:
There are three kinds of services:
- _foreground_ services: they are strictly related to user's interaction (for example music playback), so it's harder for the system to kill them.
- _background_ services: they are not directly related to user's activities, so they can be killed if more RAM is needed.
- _bound_ services: they are offers a client-server interface that allows components to interact with the service, send requests, receive results, and even do so across processes with interprocess communication (IPC).
## [Broadcast receivers](https://developer.android.com/guide/components/broadcasts)
A _broadcast receiver_ is another component without user interface (except an optional status bar notification) that lets the system to deliver events from/to the app, even when the latter hasn't been previously launched.