Android Intent调用打开Service
1,StartService
【1】打开服务
Intent it=new Intent(this, SimpleService.class);
startService(it);
【2】关闭服务
stopService(it);
2,bindService
【1】绑定服务
Intent intent = new Intent(this, LocalService.class);
bindService(intent, conn, Service.BIND_AUTO_CREATE);
【2】解绑服务
unbindService(conn);
更多Intent 使用详解:https://blog.csdn.net/cricket_7/category_9549721.html
还没有评论,来说两句吧...