Reputation: 22064
I'm wondering if there is anyway to handle an application crash. By that, I mean if we can detect a crash and when it occurs save some data, because I need to save some values into a SharedPreference if the application crashes.
Is this possible?
Upvotes: 3
Views: 2752
Reputation: 3578
You Can Use Try...Catch...finally block to Catch Exception and when Exception occurs finally block content definitely works even exception handled or not.
Upvotes: 1
Reputation: 1015
Yes there is an open-source project for reporting or handling the crash report. try this link ACRA
Upvotes: 2