Sep 21, 2021
Yes, if you use Handler directly then you have to remove the callback when the activity gets stopped or destroyed.
You can create a helper method which uses a LifecycleOwner to remove the callback for you in onDestroy or onStop, without the need to launch a coroutine.