skip to Main Content

Android Studio – Is there a way to avoid memory leak when executing a code that outlive the caller

Hello hope someone can help me. Problem: In code #1. The code inside "onListenerDisconnected" will not finish executing because the coroutine will be cancelled via onDestroy. code #1 @AndroidEntryPoint class NotificationService : NotificationListenerService() { @Inject lateinit var updateIsNotificationServiceActiveUseCase: UpdateIsNotificationServiceActiveUseCase private…

VIEW QUESTION
Back To Top
Search