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.

Saeed Neamati
  • 267
  • 1
  • 3
  • 7
  • 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 04 '15 at 13:41
  • @GiantTree and if the device is not rooted, you can use adb logcat (but not logcat in terminal) :) – Izzy Dec 04 '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 04 '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 [SO] 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 04 '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 04 '15 at 16:27
  • Yes, and exactly thatyour app which you develop must take care for – which is the part of your question you need to move to [SO]. Unless your customers' devices are rooted, there's no real alternative to that (which is the part that can stay here). Starting point for that second part: our logging tag-wiki. Having eval'd that, please [edit] your question accordingly. Your initial comment which brought you here (on my recommendation) read a little different :) // Summary: please move the dev part to SO and update the rest :) – Izzy Dec 04 '15 at 16:53

0 Answers0