I have such a method implementation and I want to understand what will happen when this method is called. Could you give me a hint
override fun onDestroy() {
Timber.d("$this: onDestroy")
stopSelf()
super.onDestroy()
}
I have such a method implementation and I want to understand what will happen when this method is called. Could you give me a hint
override fun onDestroy() {
Timber.d("$this: onDestroy")
stopSelf()
super.onDestroy()
}
onDestroy()should only be called by Android when theServicehas already stopped. Android won't callonDestroy()if theServiceis running. If you callstopSelf()inonDestroy()it should just do nothing, as theServiceis already stopped.