Skip to main content

🥷 Silent crash reports

Please note that the silent crash reports are automatically reported as Crash

Sometimes you know something went wrong, but don't want to bother your users. In this case, you may want to send a silent crash report by calling the following method:

Gleap.getInstance().sendSilentCrashReport("Houston, we have a problem!", Gleap.SEVERITY.LOW);

The SEVERITY can be set to LOW, MID, HIGH

public enum SEVERITY { 
LOW, MIDDLE, HIGH
}

The severity must be LOW, MEDIUM or HIGH. The SDK also offers constants, which you could pass as severity parameter.

Silent crash report

In some situations you want to report a silent crash report, if an exception is thrown.

// Sends a silent crash report.
Gleap.getInstance().sendSilentCrashReport("Houston, we have a problem!", Gleap.SEVERITY.LOW);

Silent bug report with exclude data

This extends the possibility of sending an silent crash report by excluding data. You can hide e.g custom data.

The full list of exclude data options is:

{
customData?: Boolean;
metaData?: Boolean;
attachments?: Boolean;
consoleLog?: Boolean;
networkLogs?: Boolean;
customEventLog?: Boolean;
screenshot?: Boolean;
replays?: Boolean;
}
JSONObject exclude = new JSONObject();
try {
exclude.put("customData",true);
}catch (Exception ex) {
ex.printStackTrace();
}

Gleap.getInstance().sendSilentCrashReport("Houston, we have a problem!", Gleap.SEVERITY.LOW, exclude);

Silent bug report with callback

This extends the possibility of sending an silent crash report by getting the information, when the crash is sent successfully.

Gleap.getInstance().sendSilentCrashReport("Houston, we have a problem!", Gleap.SEVERITY.LOW, new FeedbackSentCallback() {
@Override
public void invoke(String message) {
Toast toast = Toast.makeText(getApplicationContext(), "Silent crash report sent.", Toast.LENGTH_LONG);
toast.show();
}
}

Silent bug report with exclude and callback

This extends the possibility of sending an silent crash report by excluding data and a callback. You can hide e.g custom data.

JSONObject exclude = new JSONObject();
try {
exclude.put("customData",true);
}catch (Exception ex) {
ex.printStackTrace();
}

Gleap.getInstance().sendSilentCrashReport("Houston, we have a problem!", Gleap.SEVERITY.LOW, exclude, new FeedbackSentCallback() {
@Override
public void invoke(String message) {
Toast toast = Toast.makeText(getApplicationContext(), "Silent crash report sent.", Toast.LENGTH_LONG);
toast.show();
}
}