学习来源:《网易云课堂-Android4.0应用开发第一季》
Service作为Android的四大组件之一,常见的功能如闹钟、音乐播放、网络加载图片等都是Service实现的。
今天总结一下我之前写得通过Service给服务器实时发送GPS信息。
首先,需要提出的是,在Android开发官网中,有关于以下的说明:
Most confusion about the Service class actually revolves around what it is not:
- A Service is not a separate process. The Service object itself does not imply it is running in its own process; unless otherwise specified, it runs in the same process as the application it is part of.
- A Service is