摘要: service生命周期为context.startService() ->onCreate()- >onStartCommand()->Service running ->context.stopService() ->onDestroy() ->Service stopservice事实上是存在onStart()方法的,但是并不好用。如果Service还没有运行,则android先调用onCreate()然后调用onStartCommand(),及onStartCommand()在每次调用service时都会执行;如果Service已经运行,则只调用onS 阅读全文
posted @ 2013-02-20 21:09 茉莉花茶 阅读(356) 评论(0) 推荐(0) 编辑