简体   繁体   中英

how to know whether a process(app) has been killed?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM