Activity 启动Service两种方式与区别

Activity 启动Service两种方式:code startServicexml bindService继承   startService(Intent):生命周期 1.定义一个类继承Service 2.在Manifest.xml文件中配置该Service 3.使用Context的startService(Intent)方法启动该Service 4.再也不使用时,调用stopService(
相关文章
相关标签/搜索