public final class CrashReportDataFactory extends Object
Also responsible for holding the custom data to send with each report.
Constructor and Description |
---|
CrashReportDataFactory(android.content.Context context,
android.content.SharedPreferences prefs,
android.text.format.Time appStartDate,
String initialConfiguration) |
Modifier and Type | Method and Description |
---|---|
void |
clearCustomData()
Removes all key/value pairs from the custom data field.
|
CrashReportData |
createCrashData(String msg,
Throwable th,
Map<String,String> customData,
boolean isSilentReport,
Thread brokenThread)
Collects crash data.
|
String |
getCustomData(String key)
Gets the current value for a key in the custom data field.
|
String |
putCustomData(String key,
String value)
Adds a custom key and value to be reported with the generated
CashReportData.
|
String |
removeCustomData(String key)
Removes a key/value pair from the custom data field.
|
public CrashReportDataFactory(android.content.Context context, android.content.SharedPreferences prefs, android.text.format.Time appStartDate, String initialConfiguration)
public String putCustomData(String key, String value)
Adds a custom key and value to be reported with the generated CashReportData.
The key/value pairs will be stored in the "custom" column, as a text containing one 'key = value' pair on each line.
key
- A key for your custom data.value
- The value associated to your key.public String removeCustomData(String key)
key
- The key of the data to be removed.public void clearCustomData()
public String getCustomData(String key)
key
- The key of the data to be retrieved.public CrashReportData createCrashData(String msg, Throwable th, Map<String,String> customData, boolean isSilentReport, Thread brokenThread)
msg
- A message to be associated with the crash report.th
- Throwable that caused the crash.customData
- Custom key/value pairs to be associated with the crash report.isSilentReport
- Whether to report this report as being sent silently.brokenThread
- Thread on which the error occurred.Copyright © 2010-2015. All Rights Reserved.