Question

I am trying to debug the widget of the app I'm developing with ACRA but I have a problem. I use the following code to collect the StackTrace:

import org.acra.ACRA;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;

import android.app.Application;

@ReportsCrashes(formKey = "",
 resToastText = R.string.crash_toast_text, mailTo = "mailAddress", mode = ReportingInteractionMode.TOAST, logcatArguments = {
        "-t", "100", "-v", "long", "ActivityManager:I", "MyApp:D", "*:S" })

public class MyApplication extends Application
{
    @Override
    public void onCreate()
    {
        super.onCreate();

        // The following line triggers the initialization of ACRA
        ACRA.init(this);
    }
}

The problem is that it happens on Samsung devices that the widget become unresponsive after a random amount of time and I have no idea what is causing it (I never call onUpdate so nothing should happen but this is another story). I'd like to use ACRA to collect the StackTrace when it becomes unresponsive but when, for example, I turn on the screen after 10 minutes and see the widget not working I have no message from ACRA that has collected a crash report to send me an email and see the problem.

Is maybe ACRA not working? If the widget is not responsive (the buttons for example) it means it crashed right? Do you have any better strategy to debug this situation?

Thank you very much

Was it helpful?

Solution

If the widget is not responsive, then it hasn't crashed, it is in some kind of deadlock or waiting state. That is why you haven't received any message from ACRA.

Either looks at what the threads are doing, or injecting a healthy amount of debug to try to determine what has locked up the app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top