title: Coroutine scope on Application class android
body: <p>I need a reference to coroutine scope on my android <code>Application</code>. i did the following</p>
  
  <pre><code>class TodoApplication : Application() {
      private var job = Job()
      private val applicationScope = CoroutineScope(Dispatchers.Main + job)
  
      val tasksRepository: TasksRepository
          get() = ServiceLocator.provideTasksRepository(this, applicationScope)
  
  }
  </code></pre>
  
  <p>Is this the way to do it. If so how can I cancel coroutines launched on this scope <code>job.cancel()</code></p>
  
  <p>Application class don't have onDestroy method as Activities</p>