-
public interface ErrorReporterThis interface contains methods used to interact with ACRA after it has been initialized
-
-
Method Summary
Modifier and Type Method Description abstract StringputCustomData(String key, String value)Use this method to provide the ErrorReporter with data of your running application. abstract StringremoveCustomData(String key)Removes a key/value pair from your reports custom data field. abstract UnitclearCustomData()Removes all key/value pairs from your reports custom data field. abstract StringgetCustomData(String key)Gets the current value for a key in your reports custom data field. abstract UnithandleSilentException(Throwable e)Send a silent report for the given exception abstract UnitsetEnabled(Boolean enabled)Enable or disable this ErrorReporter. abstract UnithandleException(Throwable e, Boolean endApplication)Send a normal report for the given exception abstract UnithandleException(Throwable e)Send a normal report for the given exception. abstract SenderSchedulergetReportScheduler()Access point to manual report scheduling -
-
Method Detail
-
putCustomData
abstract String putCustomData(String key, String value)
Use this method to provide the ErrorReporter with data of your running application. You should call this at several key places in your code the same way as you would output important debug data in a log file. Only the latest value is kept for each key (no history of the values is sent in the report).
- Parameters:
key- A key for your custom data.value- The value associated to your key.
-
removeCustomData
abstract String removeCustomData(String key)
Removes a key/value pair from your reports custom data field.
- Parameters:
key- The key of the data to be removed.
-
clearCustomData
abstract Unit clearCustomData()
Removes all key/value pairs from your reports custom data field.
-
getCustomData
abstract String getCustomData(String key)
Gets the current value for a key in your reports custom data field.
- Parameters:
key- The key of the data to be retrieved.
-
handleSilentException
abstract Unit handleSilentException(Throwable e)
Send a silent report for the given exception
- Parameters:
e- The Throwable to be reported.
-
setEnabled
abstract Unit setEnabled(Boolean enabled)
Enable or disable this ErrorReporter. By default it is enabled.
- Parameters:
enabled- Whether this ErrorReporter should capture Exceptions and forward them as crash reports.
-
handleException
abstract Unit handleException(Throwable e, Boolean endApplication)
Send a normal report for the given exception
- Parameters:
e- The Throwable to be reported.endApplication- if you want the application to be ended after sending the report.
-
handleException
abstract Unit handleException(Throwable e)
Send a normal report for the given exception.
- Parameters:
e- The Throwable to be reported.
-
getReportScheduler
abstract SenderScheduler getReportScheduler()
Access point to manual report scheduling
-
-
-
-