public class ACRA extends Object
init(Application)
as soon as possible in your Application
subclass Application.onCreate()
method. Configuration items must have
been set by using ReportsCrashes
above the declaration of your
Application
subclass.Modifier and Type | Field and Description |
---|---|
static boolean |
DEV_LOGGING |
static org.acra.log.ACRALog |
log |
static String |
LOG_TAG |
static String |
PREF_ALWAYS_ACCEPT
The key of the SharedPreference allowing the user to automatically accept
sending reports.
|
static String |
PREF_DISABLE_ACRA
The key of the application default SharedPreference where you can put a
'true' Boolean value to disable ACRA.
|
static String |
PREF_ENABLE_ACRA
Alternatively, you can use this key if you prefer your users to have the
checkbox ticked to enable crash reports.
|
static String |
PREF_ENABLE_DEVICE_ID
The key of the SharedPreference allowing the user to disable sending his
device id.
|
static String |
PREF_ENABLE_SYSTEM_LOGS
The key of the SharedPreference allowing the user to disable sending
content of logcat/dropbox.
|
static String |
PREF_LAST_VERSION_NR
The version number of the application the last time ACRA was started.
|
static String |
PREF_USER_EMAIL_ADDRESS
The key of the SharedPreference allowing the user to always include his
email address.
|
Constructor and Description |
---|
ACRA() |
Modifier and Type | Method and Description |
---|---|
static android.content.SharedPreferences |
getACRASharedPreferences()
Retrieves the
SharedPreferences instance where user adjustable
settings for ACRA are stored. |
static ACRAConfiguration |
getConfig()
Provides the current ACRA configuration.
|
static ErrorReporter |
getErrorReporter() |
static ACRAConfiguration |
getNewDefaultConfig(android.app.Application app) |
static void |
init(android.app.Application app)
Initialize ACRA for a given Application.
|
static void |
init(android.app.Application app,
ACRAConfiguration config)
Initialize ACRA for a given Application.
|
static void |
init(android.app.Application app,
ACRAConfiguration config,
boolean checkReportsOnApplicationStart)
Initialize ACRA for a given Application.
|
static void |
setConfig(ACRAConfiguration conf)
Sets the whole ACRA configuration.
|
static void |
setLog(org.acra.log.ACRALog log) |
public static final boolean DEV_LOGGING
public static final String LOG_TAG
public static org.acra.log.ACRALog log
public static final String PREF_DISABLE_ACRA
public static final String PREF_ENABLE_ACRA
public static final String PREF_ENABLE_SYSTEM_LOGS
public static final String PREF_ENABLE_DEVICE_ID
public static final String PREF_USER_EMAIL_ADDRESS
public static final String PREF_ALWAYS_ACCEPT
public static final String PREF_LAST_VERSION_NR
public static void init(android.app.Application app)
Initialize ACRA for a given Application. The call to this method should
be placed as soon as possible in the Application.onCreate()
method.
app
- Your Application class.IllegalStateException
- if it is called more than once.public static void init(android.app.Application app, ACRAConfiguration config)
Initialize ACRA for a given Application. The call to this method should
be placed as soon as possible in the Application.onCreate()
method.
app
- Your Application class.config
- ACRAConfiguration to manually set up ACRA configuration.IllegalStateException
- if it is called more than once.public static void init(android.app.Application app, ACRAConfiguration config, boolean checkReportsOnApplicationStart)
Initialize ACRA for a given Application. The call to this method should
be placed as soon as possible in the Application.onCreate()
method.
app
- Your Application class.config
- ACRAConfiguration to manually set up ACRA configuration.checkReportsOnApplicationStart
- Whether to invoke
ErrorReporter.checkReportsOnApplicationStart(). Apps which adjust the
ReportSenders should set this to false and call
checkReportsOnApplicationStart() themselves to prevent a potential
race with the SendWorker and list of ReportSenders.IllegalStateException
- if it is called more than once.public static ErrorReporter getErrorReporter()
IllegalStateException
- if init(android.app.Application)
has not yet
been called.public static android.content.SharedPreferences getACRASharedPreferences()
SharedPreferences
instance where user adjustable
settings for ACRA are stored. Default are the Application default
SharedPreferences, but you can provide another SharedPreferences name
with ReportsCrashes.sharedPreferencesName()
.public static ACRAConfiguration getConfig()
ReportsCrashes
configuration instance.public static void setConfig(ACRAConfiguration conf)
conf
- ACRAConfiguration to use as a proxy for config info.public static ACRAConfiguration getNewDefaultConfig(android.app.Application app)
app
- Your Application class.ACRAConfiguration
instance with values initialized
from the ReportsCrashes
annotation.public static void setLog(org.acra.log.ACRALog log)
Copyright © 2010-2015. All Rights Reserved.