Vote count:
0
I asked a question about allowing a user to add a custom comment upon a crash here and got the tip that ACRA 4.6 included a mechanism for just that. I couldn't find any documentation or examples on how to use this, so I tried to figure it out myself, but I haven't succeeded in getting the behavior I want. I tried, for instance, adding this to the annotation:
reportDialogClass = CustomReportDialog.class
and this is what I wrote just to see if I could get a dialog to show:
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import org.acra.BaseCrashReportDialog;
public class CustomReportDialog extends BaseCrashReportDialog {
@Override
protected void onCreate(Bundle savedInstanceState) {
new AlertDialog.Builder(getApplicationContext()).setMessage("yo").setPositiveButton("pos", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}).create().show();
}
}
In general, BaseCrashReportDialog.class seems kind of confusing to me because I would have expected it to provide some kind of framework for a dialog to pop up, but it just extends from Activity, hence why I tried to show my own AlertDialog. Has anyone figured out how to properly implement this new feature? Thanks
asked 1 min ago
How to use Acra reportDialogClass
Aucun commentaire:
Enregistrer un commentaire