public class ACRAConfiguration extends Object implements ReportsCrashes
Constructor and Description |
---|
ACRAConfiguration()
Empty constructor which sets no defaults.
|
ACRAConfiguration(ReportsCrashes defaults) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, toString
public ACRAConfiguration(ReportsCrashes defaults)
defaults
- Defaults with which to initialise this ACRAConfiguration
.public ACRAConfiguration()
public ACRAConfiguration setHttpHeaders(Map<String,String> headers)
HttpSender
.
This should be used also by third party senders.headers
- A map associating HTTP header names to their values.public Map<String,String> getHttpHeaders()
public ACRAConfiguration setAdditionalDropboxTags(String[] additionalDropboxTags)
additionalDropboxTags
- the additionalDropboxTags to setpublic ACRAConfiguration setAdditionalSharedPreferences(String[] additionalSharedPreferences)
additionalSharedPreferences
- the additionalSharedPreferences to setpublic ACRAConfiguration setConnectionTimeout(Integer connectionTimeout)
connectionTimeout
- the connectionTimeout to setpublic ACRAConfiguration setCustomReportContent(ReportField[] customReportContent)
customReportContent
- the customReportContent to setpublic ACRAConfiguration setDeleteUnapprovedReportsOnApplicationStart(Boolean deleteUnapprovedReportsOnApplicationStart)
deleteUnapprovedReportsOnApplicationStart
- the deleteUnapprovedReportsOnApplicationStart to setpublic ACRAConfiguration setDeleteOldUnsentReportsOnApplicationStart(Boolean deleteOldUnsentReportsOnApplicationStart)
deleteOldUnsentReportsOnApplicationStart
- When to delete old (unsent) reports on startup.public ACRAConfiguration setDropboxCollectionMinutes(Integer dropboxCollectionMinutes)
dropboxCollectionMinutes
- the dropboxCollectionMinutes to setpublic ACRAConfiguration setForceCloseDialogAfterToast(Boolean forceCloseDialogAfterToast)
forceCloseDialogAfterToast
- the forceCloseDialogAfterToast to setpublic ACRAConfiguration setFormUri(String formUri)
ErrorReporter.setDefaultReportSenders()
after modifying this
value if you were not using a formUri before (a mailTo or formKey
instead).formUri
- the formUri to setpublic ACRAConfiguration setFormUriBasicAuthLogin(String formUriBasicAuthLogin)
formUriBasicAuthLogin
- the formUriBasicAuthLogin to setpublic ACRAConfiguration setFormUriBasicAuthPassword(String formUriBasicAuthPassword)
formUriBasicAuthPassword
- the formUriBasicAuthPassword to setpublic ACRAConfiguration setIncludeDropboxSystemTags(Boolean includeDropboxSystemTags)
includeDropboxSystemTags
- the includeDropboxSystemTags to setpublic ACRAConfiguration setLogcatArguments(String[] logcatArguments)
logcatArguments
- the logcatArguments to setpublic ACRAConfiguration setMailTo(String mailTo)
ErrorReporter.setDefaultReportSenders()
after modifying this
value if you were not using a formKey before (a formKey or formUri
instead).mailTo
- the mailTo to setpublic ACRAConfiguration setMaxNumberOfRequestRetries(Integer maxNumberOfRequestRetries)
maxNumberOfRequestRetries
- the maxNumberOfRequestRetries to setpublic ACRAConfiguration setMode(ReportingInteractionMode mode) throws ACRAConfigurationException
ReportingInteractionMode
. You must set
required configuration items first.mode
- the new mode to set.ACRAConfigurationException
- if a configuration item is missing for this mode.public ACRAConfiguration setResDialogPositiveButtonText(int resId)
public ACRAConfiguration setResDialogNegativeButtonText(int resId)
public ACRAConfiguration setReportDialogClass(Class<? extends BaseCrashReportDialog> reportDialogClass)
public ACRAConfiguration setResDialogCommentPrompt(int resId)
ReportsCrashes.resDialogCommentPrompt()
comes from an Android
Library Project.resId
- The resource id, see
ReportsCrashes.resDialogCommentPrompt()
public ACRAConfiguration setResDialogEmailPrompt(int resId)
ReportsCrashes.resDialogEmailPrompt()
comes from an Android
Library Project.resId
- The resource id, see
ReportsCrashes.resDialogEmailPrompt()
public ACRAConfiguration setResDialogIcon(int resId)
ReportsCrashes.resDialogIcon()
comes from an Android Library
Project.resId
- The resource id, see ReportsCrashes.resDialogIcon()
public ACRAConfiguration setResDialogOkToast(int resId)
ReportsCrashes.resDialogOkToast()
comes from an Android Library
Project.resId
- The resource id, see ReportsCrashes.resDialogOkToast()
public ACRAConfiguration setResDialogText(int resId)
ReportsCrashes.resDialogText()
comes from an Android Library
Project.resId
- The resource id, see ReportsCrashes.resDialogText()
public ACRAConfiguration setResDialogTitle(int resId)
ReportsCrashes.resDialogTitle()
comes from an Android Library
Project.resId
- The resource id, see ReportsCrashes.resDialogTitle()
public ACRAConfiguration setResNotifIcon(int resId)
ReportsCrashes.resNotifIcon()
comes from an Android Library
Project.resId
- The resource id, see ReportsCrashes.resNotifIcon()
public ACRAConfiguration setResNotifText(int resId)
ReportsCrashes.resNotifText()
comes from an Android Library
Project.resId
- The resource id, see ReportsCrashes.resNotifText()
public ACRAConfiguration setResNotifTickerText(int resId)
ReportsCrashes.resNotifTickerText()
comes from an Android Library
Project.resId
- The resource id, see
ReportsCrashes.resNotifTickerText()
public ACRAConfiguration setResNotifTitle(int resId)
ReportsCrashes.resNotifTitle()
comes from an Android Library
Project.resId
- The resource id, see ReportsCrashes.resNotifTitle()
public ACRAConfiguration setResToastText(int resId)
ReportsCrashes.resToastText()
comes from an Android Library
Project.resId
- The resource id, see ReportsCrashes.resToastText()
public ACRAConfiguration setSharedPreferenceMode(Integer sharedPreferenceMode)
sharedPreferenceMode
- the sharedPreferenceMode to setpublic ACRAConfiguration setSharedPreferenceName(String sharedPreferenceName)
sharedPreferenceName
- the sharedPreferenceName to setpublic ACRAConfiguration setSocketTimeout(Integer socketTimeout)
socketTimeout
- the socketTimeout to setpublic ACRAConfiguration setLogcatFilterByPid(Boolean filterByPid)
filterByPid
- true if you want to collect only logcat lines related to your
application process.public ACRAConfiguration setSendReportsInDevMode(Boolean sendReportsInDevMode)
sendReportsInDevMode
- false if you want to disable sending reports in development
mode. Reports will be sent only on signed applications.public ACRAConfiguration setSendReportsAtShutdown(Boolean sendReportsAtShutdown)
sendReportsAtShutdown
- false if you want to disable sending reports at the time the
exception is caught. Reports will be sent when the application
is restarted.public ACRAConfiguration setExcludeMatchingSharedPreferencesKeys(String[] excludeMatchingSharedPreferencesKeys)
excludeMatchingSharedPreferencesKeys
- an array of Strings containing regexp defining
SharedPreferences keys that should be excluded from the data
collection.public ACRAConfiguration setExcludeMatchingSettingsKeys(String[] excludeMatchingSettingsKeys)
excludeMatchingSettingsKeys
- an array of Strings containing regexp defining
Settings.System, Settings.Secure and Settings.Global keys that
should be excluded from the data collection.public ACRAConfiguration setBuildConfigClass(Class buildConfigClass)
public ACRAConfiguration setApplicationLogFile(String applicationLogFile)
applicationLogFile
- The path and file name of your application log file, to be
used with ReportField.APPLICATION_LOG
.public ACRAConfiguration setApplicationLogFileLines(int applicationLogFileLines)
applicationLogFileLines
- The number of lines of your application log to be collected,
to be used with ReportField.APPLICATION_LOG
and
ReportsCrashes.applicationLogFile()
.public ACRAConfiguration setDisableSSLCertValidation(boolean disableSSLCertValidation)
disableSSLCertValidation
- Set this to true if you need to send reports to a server over
SSL using a self-signed certificate.public ACRAConfiguration setHttpMethod(HttpSender.Method httpMethod)
httpMethod
- The method to be used to send data to the server.public ACRAConfiguration setReportType(HttpSender.Type type)
type
- The type of content encoding to be used to send data to the
server.public void setKeyStore(KeyStore keyStore)
keyStore
- Set this to the keystore that contains the trusted certificatespublic String[] additionalDropBoxTags()
public String[] additionalSharedPreferences()
public Class<? extends Annotation> annotationType()
annotationType
in interface Annotation
public int connectionTimeout()
public ReportField[] customReportContent()
public boolean deleteUnapprovedReportsOnApplicationStart()
public boolean deleteOldUnsentReportsOnApplicationStart()
public int dropboxCollectionMinutes()
public boolean forceCloseDialogAfterToast()
public String formUri()
public String formUriBasicAuthLogin()
public String formUriBasicAuthPassword()
public boolean includeDropBoxSystemTags()
public String[] logcatArguments()
public String mailTo()
public int maxNumberOfRequestRetries()
public ReportingInteractionMode mode()
public int resDialogPositiveButtonText()
public int resDialogNegativeButtonText()
public int resDialogCommentPrompt()
public int resDialogEmailPrompt()
public int resDialogIcon()
public int resDialogOkToast()
public int resDialogText()
public int resDialogTitle()
public int resNotifIcon()
public int resNotifText()
public int resNotifTickerText()
public int resNotifTitle()
public int resToastText()
public int sharedPreferencesMode()
public String sharedPreferencesName()
public int socketTimeout()
public boolean logcatFilterByPid()
public boolean sendReportsInDevMode()
public boolean sendReportsAtShutdown()
public String[] excludeMatchingSharedPreferencesKeys()
public String[] excludeMatchingSettingsKeys()
public Class buildConfigClass()
public String applicationLogFile()
public int applicationLogFileLines()
public boolean disableSSLCertValidation()
public String httpsSocketFactoryFactoryClass()
public Class<? extends BaseCrashReportDialog> reportDialogClass()
public void setHttpsSocketFactoryFactory(org.acra.util.HttpsSocketFactoryFactory httpsSocketFactoryFactory)
httpsSocketFactoryFactory
- HttpsSocketFactoryFactory to set.public org.acra.util.HttpsSocketFactoryFactory getHttpSocketFactoryFactory()
public HttpSender.Method httpMethod()
public HttpSender.Type reportType()
public KeyStore keyStore()
public static boolean isNull(String aString)
Copyright © 2010-2015. All Rights Reserved.