0

I want to determine programmatically when the user has closed the android ebook reader app Aldiko.

Is there a way to be notified (perhaps an Intent) by the operating system of this event? I think creating a cron-like task that polls the process list would consume much battery if called too often.

Hakan
  • 537
  • 4
  • 13
  • You are basing this on a misunderstanding of the philosophy behind the android activity lifecycle: users do not "close" applications, they "walk away" to do something else, and android decides by itself if the process that was hosting that application should be retained on the chance they might come back, or killed to free up resources. – Chris Stratton Jul 11 '11 at 14:23

1 Answers1

1

I highly suggest carefully reading through the Activity Lifecycle and this SO question.

Community
  • 1
  • 1
f20k
  • 3,106
  • 3
  • 23
  • 32