service thread 结合使用

1.启动 context.startservice  来启动service

2.service 中新建内部类 extens thread

3.重写新建内部类中的run

  run中增加循环,循环中加Thread.sleep(1000)来延迟

4.service中的onCreate中增加 新建内部类型变量的start();

posted @ 2012-11-21 22:57  镇水古月  阅读(193)  评论(0编辑  收藏  举报