Service 使用

启动和停止Service:

Intent startIntent = new Intent(this, MyService.class);
startService(startIntent); // 启动服务
Intent stopIntent = new Intent(this, MyService.class);
stopService(stopIntent); // 停止服务

 

posted @ 2015-02-02 21:24  plmmlp09  阅读(118)  评论(0编辑  收藏  举报