第一周
-Overview of Android Services
Unlike Activities, Services don’t interact with the user directly. Activities typically launch Services
- Activities can use Services to perform long-duration operations or access remote resources in the background.
- Service can run in background even if switches activities or runtime configuration changes occur
- Service use an Android IPC mechanism to tal with the user interface.
- A service may or may not actually in a background.
Two types of Services
Started Service
- Launched via startService()
- Often performs one operation
- Needn’t return a result to the client
Bound Service