0

Whats is the alternate method to find whether the app is killed from recent list or not in android Oreo?

Requirement : App kill state has to be saved in local db.

Is there any alternate method available or any libraries to monitor app activity killed from recents?

Requesting for any suggestions related onTaskRemoved in Oreo.

SARATH V
  • 500
  • 1
  • 7
  • 33

1 Answers1

3

I don't think there's any event callback that instructs that your app is destroyed, if so, then it will re-alive that app - which is totally negating the idea of killing staled apps.

Instead, you can always save your app's state whenever user switches away from your app i.e. save whatever you want in onStop method of your Activity.

waqaslam
  • 67,549
  • 16
  • 165
  • 178