Khudoyshukur

Results 3 comments of Khudoyshukur

@thatfiredev I am creating a coroutine scope and cancelling it in onDestroy(). Is there any possibility of onDestroy() being called before the scope completes its job? Is the onDestroy() called...

@rostik404 I was also facing the same issue. Now, I am enqueueing a [worker](https://developer.android.com/topic/libraries/architecture/workmanager) class for long-running async work in onMessageReceived()

@rostik404 Yes, inside onMessageReceived(). I provide an example: ``` override fun onMessageReceived(remoteMessage: RemoteMessage) { ... val workRequest = OneTimeWorkRequestBuilder().build() WorkManager.getInstance(context).enqueue(workRequest) } ```