入门请登陆A安卓巴士
http://www.apkbus.com/forum.php?mod=viewthread&tid=654&fromuid=117522
Service的作用:比如播放音乐,或者记录你地理信息位置的改变,或者启动一个服务来运行并一直监听某种动作!
Service的生命周期:
context.startService() ->onCreate()- >onStart()->Service running--调用context.stopService() ->onDestroy()
context.bindService()->onCreate()->onBind()->Service running--调用>onUnbind() -> onDestroy(
上左边为:本地服务,右边:远程服务!