Android Patterns: Error Reporting

, , , at November 24th, 2009 by 小影

Problem

Your software has bugs, and you would like to be notified when it happened. You would also like to get a stack trace for debug purpose.

Forces

Uncatch runtime exception cause application abort (“Force Close”), user can hardly report any meaningful information in such case

Solution

Use java Thread.setDefaultUncaughtExceptionHandler(handler) to report errors.

Simulated Errors

Nullwire built and share a very nice library android-remote-stacktrace. Just include this library and add one line of code in your app, and its done!

They also provided a PHP based server. I have built one using Ruby/Sinatra, which can be hosted on Heroku for free. It send error notification email/tweet using Pushr!

Email Error Report

相關文章

Post a Comment