當我打電話this.startService(new Intent(this, Some_Service.class));
我知道onCreate()
被調用,其次是onStartCommand()
。服務在onStartCommand()完成後會自動停止嗎?
bur如果onStartCommand()
中的代碼已完成,會發生什麼情況?
Service
自動撥打onDestroy()
自行停止嗎?
或者我必須撥打this.stopService(new Intent(this, Some_Service.class));
來實現嗎?