Service

Serviceのライフサイクル(図:他サイトを参照)

Local Service

●Serviceを起動

context.startService() ⇒ onCreate() ⇒ onStartCommand()

●Serviceを停止

context.stopService() ⇒ onDestroy()

Remote Service

●Serviceを起動

context.bindService() ⇒ onCreate() ⇒ onBind()

●Serviceを停止

context.unbindService() ⇒ onUnbind() ⇒ onDestroy()