Seishin's Life
  • Home
  • About Me
Sign in Subscribe

IntentService

Easy way to detect when your app is going to be killed

Recently I needed a way of detecting when the app is going to be killed and execute some operations. Here is a really easy solution by using an IntentService: class AppKilledDetectingService: IntentService("AppKilledDetectingService") { override fun onHandleIntent(intent: Intent?) {} override fun onTaskRemoved(rootIntent: Intent?) { // Do your operations before the app is
Atanas Dimitrov Jul 13, 2018

Subscribe to Seishin's Life

Don't miss out on the latest news. Sign up now to get access to the library of members-only articles.
  • Sign up
Seishin's Life © 2023. Powered by Ghost