Service依照其启动的方法,可分为两种:
1、Started
Started的Service,通过在Application里用startService(Intent
intent)办法来启动。这类类型的Service一经启动,会在后面无停止地运行,即便启动它的Activity被Destroy掉。要停滞此类型的Service,可在Service中调用stopSelf()或在Application中调用stopService(Intent intent),要不然就只能等Android体系在体系资源紧张的时候把它杀掉。Started的Service,通过在