0

when a app has caused a exception and been killed ,how can i catch this info to clear some resources associated with this app? are there some servers to service for this situation?

for example, my app will generate some notification,and the app may cause a exception,how to clear the notifications when the app be killed?

Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274
mogutou
  • 103
  • 2
  • 7

1 Answers1

0

If you are concerned about an Exception causing termination of your application, you could make use of the Thread.UncaughtExceptionHandler and perform your cleanup.

Take a look at how ACRA makes use of this to send crash reports.

Rajesh
  • 15,724
  • 7
  • 46
  • 95