Carnal
Carnal

Reputation: 22064

Android - Handle app crash

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

Answers (2)

Krishnakant Dalal
Krishnakant Dalal

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

mayank_droid
mayank_droid

Reputation: 1015

Yes there is an open-source project for reporting or handling the crash report. try this link ACRA

Upvotes: 2

Related Questions