0

In Windows, when an application crashes because of an unhandled exception, there is a place called Event Viewer that gives a good amount of informative data about the process being crashed down.

Using that information, one can easily troubleshoot the application.

In Android, we have developed an application that on the phone of a customer keeps crashing repeatedly and we don't have a chance to log anything.

Do we have something similar here in Android? Or in general, how should we know about unhandled exceptions in Android?

Please note that because the app is installed on customer's phone, it's a user question. We want to know a way to be able to find a log somewhere somehow by the help of our customer, and act accordingly.

  • If the device is rooted, you are able to use the command logcat in adb or the terminal in order to access the internal log. Keep in mind that this log can contain private information. For an application, you are better of using ready solutions like Fabric/Crashlytics, that register a handler for unhandled exceptions. – GiantTree Dec 4 '15 at 13:41
  • @GiantTree and if the device is not rooted, you can use adb logcat (but not logcat in terminal) :) – Izzy Dec 4 '15 at 15:43
  • 1
    @Izzy oh right, adbd (the process on the phone itself) is a system process, I forgot. Yes, that works. Otherwise logcat only returns the log of the own process/app. – GiantTree Dec 4 '15 at 15:44
  • @Saeed: It's still a "develoment question in parts". If you're just concerned about an app you wrote (and thus can modify), you can implement a crash handler (as GiantTree pointed out) – but that is better asked at Stack Overflow for details. As GiantTree just pointed out (while I was writing this comment), each app can see its own logs (before Android 4.1, it could see the entire log – since 4.1 this is reserved for system apps). – Izzy Dec 4 '15 at 15:46
  • @Izzy, adb is for when I'm developing and it's my device. We want to know how can we help our users access their phone log somehow and send it to us. – Saeed Neamati Dec 4 '15 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.