Android四大组件之Service

第一种方式: 通过start方式开启服务 使用service的步骤: 定义一个类继承Service; manifest.xml文件中配置Service; 使用context.startService(Intent)启动Service; 不使用时,调用context.stopService(Intent)停止服务; 使用start方式启动的生命周期: onCreate() -> onStartCom
相关文章
相关标签/搜索