質問

What I want to do:

Get feedback on my Android app from within the app itself.

What I've done:

I've just integrated the latest version of ACRA (4.4) to my Android App.

It has silent reports on crashes as the default behaviour

What I want help with:

All I want to do is use the dialog report when I press a Feedback button on my app.

役に立ちましたか?

解決

I don't know exactly what you want to achieve with your feedback button, but perhaps something like this?

For the configuration of the dialog look at https://github.com/ACRA/acra/wiki/AdvancedUsage#wiki-Dialog. The configuration could also be done in code in the ACRAConfiguration object if you do not want all this in your annotation.

You can then temporarily change the Reporting mode by using:

ACRAConfiguration config = ACRA.getConfig();
config.setMode(ReportingInteractionMode.DIALOG);
ACRA.setConfig(config);
doWhateverYourFeedbackButtonShouldDo();
config.setMode(ReportingInteractionMode.SILENT);
ACRA.setConfig(config);

where doWhateverYourFeedbackButtonShouldDo() can be something like:

ACRA.getErrorReporter().handleException(new UserFeedbackException(userFeedback));
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top