8

I am writing an crash report application which will run as a service in background and should be able to detect other application crash, and present a user will option to report error.

So, which event should I be looking for in order to detect application crash?

ActivityManager.ProcessErrorStateInfo() class basically provides error condition. Can I use this?

CopsOnRoad
  • 237,138
  • 77
  • 654
  • 440
learner
  • 651
  • 2
  • 7
  • 4

3 Answers3

5

Check out Crittercism. It automatically captures crashes and diagnostics for you and it's free I think.

leonardo69
  • 151
  • 1
  • 3
5

Do you mean something like this:

        Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {

            @Override
            public void uncaughtException(Thread t, Throwable e) {
                // TODO implement this

            }
        });
TacB0sS
  • 10,106
  • 12
  • 75
  • 118
2

You might check out the ACRA application.

It's an Apache-licensed Android crash reporter. I don't think it will help you detect crashes in other applications. Incidentally, I'm not sure this is even possible.

Matthew
  • 44,826
  • 10
  • 98
  • 87