2

Hello I am looking for the any global callback that get executed when user close my app from "Recent Apps" manually. Is there any trick to detect this ?

I am not looking for onDestroy because that also call when you press back button so that can not differentiate whether user has closed it from "Recent Apps" or from back button.

Thanks in advance.

N Sharma
  • 33,489
  • 95
  • 256
  • 444
  • Why do you need to know if it's closed from Recent Apps as opposed to in any other scenario? – Squonk May 25 '14 at 20:07
  • There is no specific reason but I am curious to know if it is possible. – N Sharma May 25 '14 at 20:08
  • I'd be fairly sure it's not possible although I can't guarantee that 100%. Also I'm not sure why it would be useful. Even if you exit an `Activity` using the `BACK` button although the `Activity` will be destroyed the app framework will still be retained and the app will also still appear in Recent Apps. If you press `HOME` when your app is active then all that happens is you bring the Home screen to the foreground. If you then remove your app from Recent apps, it's effectively the same as finishing all of your current app components but the app framework is still retained in a basic state. – Squonk May 25 '14 at 20:16
  • Follow the below link to get the answer http://stackoverflow.com/questions/27498582/how-to-detect-app-removed-from-the-recent-list – Shaik Taher Mar 08 '17 at 11:15

0 Answers0