Send Logcat output of an App to an EmailAdress

We are now testing our application with a few friends. Sometimes there are some errors which don't throw an exception. So I don't really know whats the problem was. So I thought it would be a good idea to implement a menu item which allows to send the logcat output to a e-mail address, so that we can examine the log.

Unfortunately I didn't find a hint in the Internet how to extract the logcat from a phone. How to send an email shouldn't be the problem.


Solution 1:

Look at android-log-collector, as it does what you are trying to do.

It is not possible to collect arbitrary LogCat data as of Android 4.1. There was never a documented and supported way of doing that, and the undocumented/unsupported way was locked down in Jelly Bean. For your own crashes, you are better served using a crash logging library, like ACRA.

Solution 2:

I would also look into Flurry (flurry.com) which not only gives you general analytics but allows you to log arbitrary info and also logs uncaught exceptions for you. I set it up in literally 5 minutes, but one thing to keep in mind is that it's not real-time like an email alert. You'll have to wait a few hours for what you log in your app to show up on their dashboard. It could also be overkill if you have a really lightweight app, but I've noticed no performance loss in my app as a result of using the service.