-
public class ACRAUse this class to initialize the crash reporting feature using .init as soon as possible in your Application subclass Application.onCreate method. Configuration items must have been set by using org.acra.annotation.AcraCore above the declaration of your Application subclass.
-
-
Field Summary
Fields Modifier and Type Field Description public BooleanDEV_LOGGINGpublic final StringLOG_TAGpublic ACRALoglogprivate final StringPREF_DISABLE_ACRAprivate final StringPREF_ENABLE_ACRAprivate final StringPREF_ENABLE_SYSTEM_LOGSprivate final StringPREF_ENABLE_DEVICE_IDprivate final StringPREF_USER_EMAIL_ADDRESSprivate final StringPREF_ALWAYS_ACCEPTprivate final StringPREF_LAST_VERSION_NRprivate static ErrorReportererrorReporterprivate final BooleanisInitialisedpublic final static ACRAINSTANCE
-
Method Summary
Modifier and Type Method Description final static Unitinit(Application app, CoreConfigurationBuilder builder, Boolean checkReportsOnApplicationStart)Initialize ACRA for a given Application. final static Unitinit(Application app, CoreConfigurationBuilder builder)Initialize ACRA for a given Application. final static Unitinit(Application app)Initialize ACRA for a given Application. final static Unitinit(Application app, CoreConfiguration config, Boolean checkReportsOnApplicationStart)Initialize ACRA for a given Application. final static Unitinit(Application app, CoreConfiguration config)Initialize ACRA for a given Application. final static BooleanisACRASenderServiceProcess()final BooleangetDEV_LOGGING()final UnitsetDEV_LOGGING(@JvmField() Boolean DEV_LOGGING)final StringgetLOG_TAG()final ACRALoggetLog()final UnitsetLog(@JvmField() ACRALog log)final StringgetPREF_DISABLE_ACRA()The key of the application default SharedPreference where you can put a 'true' Boolean value to disable ACRA. final StringgetPREF_ENABLE_ACRA()Alternatively, you can use this key if you prefer your users to have the checkbox ticked to enable crash reports. final StringgetPREF_ENABLE_SYSTEM_LOGS()The key of the SharedPreference allowing the user to disable sending content of logcat/dropbox. final StringgetPREF_ENABLE_DEVICE_ID()The key of the SharedPreference allowing the user to disable sending his device id. final StringgetPREF_USER_EMAIL_ADDRESS()The key of the SharedPreference allowing the user to always include his email address. final StringgetPREF_ALWAYS_ACCEPT()The key of the SharedPreference allowing the user to automatically accept sending reports. final StringgetPREF_LAST_VERSION_NR()The version number of the application the last time ACRA was started. final static ErrorReportergetErrorReporter()the current instance of ErrorReporter. final static UnitsetErrorReporter(ErrorReporter errorReporter)final BooleangetIsInitialised()-
-
Method Detail
-
init
@JvmOverloads() final static Unit init(Application app, CoreConfigurationBuilder builder, Boolean checkReportsOnApplicationStart)
Initialize ACRA for a given Application.
The call to this method should be placed as soon as possible in the Application.attachBaseContext method.
- Parameters:
app- Your Application class.builder- ConfigurationBuilder to manually set up ACRA configuration.checkReportsOnApplicationStart- Whether to invoke ErrorReporter.checkReportsOnApplicationStart().
-
init
@JvmOverloads() final static Unit init(Application app, CoreConfigurationBuilder builder)
Initialize ACRA for a given Application.
The call to this method should be placed as soon as possible in the Application.attachBaseContext method.
- Parameters:
app- Your Application class.builder- ConfigurationBuilder to manually set up ACRA configuration.
-
init
@JvmOverloads() final static Unit init(Application app)
Initialize ACRA for a given Application.
The call to this method should be placed as soon as possible in the Application.attachBaseContext method.
- Parameters:
app- Your Application class.
-
init
@JvmOverloads() final static Unit init(Application app, CoreConfiguration config, Boolean checkReportsOnApplicationStart)
Initialize ACRA for a given Application. The call to this method should be placed as soon as possible in the Application.attachBaseContext method.
- Parameters:
app- Your Application class.config- CoreConfiguration to manually set up ACRA configuration.checkReportsOnApplicationStart- Whether to invoke ErrorReporter.checkReportsOnApplicationStart().
-
init
@JvmOverloads() final static Unit init(Application app, CoreConfiguration config)
Initialize ACRA for a given Application. The call to this method should be placed as soon as possible in the Application.attachBaseContext method.
- Parameters:
app- Your Application class.config- CoreConfiguration to manually set up ACRA configuration.
-
isACRASenderServiceProcess
final static Boolean isACRASenderServiceProcess()
-
getDEV_LOGGING
final Boolean getDEV_LOGGING()
-
setDEV_LOGGING
final Unit setDEV_LOGGING(@JvmField() Boolean DEV_LOGGING)
-
getLOG_TAG
final String getLOG_TAG()
-
getPREF_DISABLE_ACRA
final String getPREF_DISABLE_ACRA()
The key of the application default SharedPreference where you can put a 'true' Boolean value to disable ACRA.
-
getPREF_ENABLE_ACRA
final String getPREF_ENABLE_ACRA()
Alternatively, you can use this key if you prefer your users to have the checkbox ticked to enable crash reports. If both acra.disable and acra.enable are set, the value of acra.disable takes over the other.
-
getPREF_ENABLE_SYSTEM_LOGS
final String getPREF_ENABLE_SYSTEM_LOGS()
The key of the SharedPreference allowing the user to disable sending content of logcat/dropbox. System logs collection is also dependent of the READ_LOGS permission.
-
getPREF_ENABLE_DEVICE_ID
final String getPREF_ENABLE_DEVICE_ID()
The key of the SharedPreference allowing the user to disable sending his device id. Device ID collection is also dependent of the READ_PHONE_STATE permission.
-
getPREF_USER_EMAIL_ADDRESS
final String getPREF_USER_EMAIL_ADDRESS()
The key of the SharedPreference allowing the user to always include his email address.
-
getPREF_ALWAYS_ACCEPT
final String getPREF_ALWAYS_ACCEPT()
The key of the SharedPreference allowing the user to automatically accept sending reports.
-
getPREF_LAST_VERSION_NR
final String getPREF_LAST_VERSION_NR()
The version number of the application the last time ACRA was started. This is used to determine whether unsent reports should be discarded because they are old and out of date.
-
getErrorReporter
final static ErrorReporter getErrorReporter()
the current instance of ErrorReporter. not available if ACRA.init has not yet been called.
-
setErrorReporter
final static Unit setErrorReporter(ErrorReporter errorReporter)
-
getIsInitialised
final Boolean getIsInitialised()
-
-
-
-