Skip to main content

Privacy and Report fields

Previous version

This page documents Bugsee Android SDK 6.x, the previous major version. The current line is 7.x — see Migrating from 6.x to 7.x to upgrade, or Installation to start a new integration.

You can use both pre and postprocessing for report fields. This is useful when you want to strip any sensitive data user may enter into it or when you want to apply some specific formatting.

The principle is simple, for every generated report, Bugsee will call the corresponding method from provided ReportFieldsFilter object. You should then perform all the required fields manipulations and call listener.onChanged(reportFields) to pass it back to Bugsee. listener.onChanged(reportFields) can be called on a thread other than the calling thread.

Bugsee.setReportFieldsFilter(new ReportFieldsFilter() {
@Override
public void addFieldsBeforeReportCreated(ReportFields reportFields, OnChangeReportFieldsListener listener) {
reportFields.setSummary("Before: " + reportFields.getSummary());
reportFields.setDescription("Before: " + reportFields.getDescription());
ArrayList labels = reportFields.getLabels();
labels.add("before");
reportFields.setLabels(labels);
reportFields.setSeverity(IssueSeverity.VeryLow);
listener.onChanged(reportFields);
}

@Override
public void changeFieldsAfterReportCreated(ReportFields reportFields, OnChangeReportFieldsListener listener) {
reportFields.setSummary(reportFields.getSummary() + " :After");
reportFields.setDescription(reportFields.getDescription() + " :After");
ArrayList labels = reportFields.getLabels();
labels.add("after");
reportFields.setLabels(labels);
reportFields.setSeverity(IssueSeverity.Blocker);
listener.onChanged(reportFields);
}
});
Found an issue, typo, or wrong statement on this page? Report it now →