
停止
Service
Service 一旦创建就会一直保持在后台运行,除非必须回收内存资源,否则系统不会停止
或销毁 Service。开发者可以在 Service 中通过 terminateAbility()停止本 Service 或在其他
Ability 调用 stopAbility()来停止 Service。
停止 Service 同样支持停止本地设备 Service 和停止远程设备 Service,使用方法与启动
Service 一样。一旦调用停止 Service 的方法,系统便会尽快销毁 Service。
