Éva,

There are applications in Market that allow the user collect the logcat and email it (to you).

Another option is to use one of the several available error reporting libraries, such as ACRA:

http://code.google.com/p/acra/

Yet another option is to add your own error reporting code, it's pretty simple:

- Use Thread.setDefaultUncaughtExceptionHandler early during startup

- When an exception is reported, do something like this:

@Override
public void uncaughtException(Thread t, Throwable e) {
/*
* Build stack trace
*/
Writer result = new StringWriter();
PrintWriter writer = new PrintWriter(result);
e.printStackTrace(writer);

Throwable cause = e.getCause();
while (cause != null) {
writer.append("\nCaused by:\n");
cause.printStackTrace(writer);
cause = cause.getCause();
}
String stackTrace = result.toString();
writer.close();

/* Stack trace is in "stackTrace", send as email, or write to sd card */

if (mPrevExceptionHandler != null) {
/*
* Call the default handler: this will notify the user
*/
mPrevExceptionHandler.uncaughtException(t, e);
}
}

-- Kostya

08.11.2010 16:48, Éva Lovrencsics пишет:
Hello Developers!

I have an app, which force closes at one of my users. Other users
haven't got any problem with it. This user has Android 1.6, so no
"Report" button at force close. I have also 1.6, and my app works
perfectly on my phone.
Do you know what is the best way to debug it at the user? I don't have
any idea, what the problem is. (It crashes at startup.) Can I see the
logs, or what can I do?

Evi



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to