Search code examples
androidacra

ACRA with android: How to execute code before crash is reported


I am using ACRA woth my android app. My question is, when a crash happens, how can I make sure I execute some code before the crash is reported. I mean I would like to add some custom variables when the crash happens so I know what state the app was in?

Please help

Thank you


Solution

  • Implement your own sender as described here. It can be simply a wrapper around some existing sender, forwarding the sending functionality there.

    Inside the sender code, you can take any special actions before actually sending the report.