Service
Android Developer对于Service如下定义,
A Service is an application component that can perform long-running
operations in the background and does not provide a user interface.
Another application component can start a service and it will continue
to run in the background even if the user switches to another
application. Additionally, a component can bind to a service to
interact with it and even perform interprocess communication (IPC).
For example, a service might handle network transactions, play music,
perform file I/O, or interact with a content provider, all from the
background.
简单翻译一下,一个服务(Service)是一个应用的组件,其可以在后台执行长时间的操作,而且不提供UI。其他应用组件可以开启一个服务,该服务将会在后台一直运行,纵使用户切换到了其他应用。另外,一个组件可以捆绑到服务上,来与其交互,甚至执行IPC。例如,一个服务可以执行网络链接、播放音乐、执行I/O或者和一个内容提供者(Content Provider)交互,都是在后台运行。
或许