In what cases on Destroy method is not called but application is killed out? I didn't make such situation, but need to do it. So I need to get a situation where on Destroy method will not be called but application will be killed?
Asked
Active
Viewed 39 times
0
-
4Possible duplicate of [Android Activity onDestroy() is not always called and if called only part of the code is executed](https://stackoverflow.com/questions/18361719/android-activity-ondestroy-is-not-always-called-and-if-called-only-part-of-the) – ADM Nov 15 '17 at 11:13
-
go though to this link [https://stackoverflow.com/a/32508320/5308778](https://stackoverflow.com/a/32508320/5308778) – yashkal Nov 15 '17 at 11:20
2 Answers
0
app is running that time you can press home button, check app is running in background that time you can directly kill this app. this scenario onDestroy method didn't call.

Pratik18
- 365
- 1
- 7
0
onStop()
will be called every time but onDestroy()
will not be called if
• User remove application from recent
• User force stop application from app info
• User uninstalls application even if App is in background.

Aks4125
- 4,522
- 4
- 32
- 48