title: Prevent kotlin coroutine from being interrupted even if user navigates away
body: <p>In my code, a method performs three API POST and it takes a while for each of those to complete. I'm using kotlin coroutine launch on that method. But I also want the user to be able to navigate away from the page while the task is running. I don't want the task of performing three API calls to be interrupted when navigating away. What is the best way to do that? Is WorkManager the way to go?</p>
  <p>Somehow my question is similar to <a href="https://stackoverflow.com/questions/12223485/make-my-android-app-work-even-if-the-user-navigates-away-from-it-how-do-i-do-th">this</a> but I need to do it in Kotlin. Is the answers in that post still relevant?</p>