|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.acra.ACRAConfiguration
public class ACRAConfiguration
This class is to be used if you need to apply dynamic settings. This is needed for example when using ACRA in an Android Library Project since ADT v14 where resource ids are not final anymore and can't be passed as annotation parameters values.
Constructor Summary | |
---|---|
ACRAConfiguration(ReportsCrashes defaults)
|
Method Summary | |
---|---|
String[] |
additionalDropBoxTags()
|
String[] |
additionalSharedPreferences()
|
Class<? extends Annotation> |
annotationType()
|
String |
applicationLogFile()
|
int |
applicationLogFileLines()
|
int |
connectionTimeout()
|
ReportField[] |
customReportContent()
|
boolean |
deleteOldUnsentReportsOnApplicationStart()
|
boolean |
deleteUnapprovedReportsOnApplicationStart()
|
boolean |
disableSSLCertValidation()
|
int |
dropboxCollectionMinutes()
|
String[] |
excludeMatchingSettingsKeys()
|
String[] |
excludeMatchingSharedPreferencesKeys()
|
boolean |
forceCloseDialogAfterToast()
|
String |
formKey()
|
String |
formUri()
|
String |
formUriBasicAuthLogin()
|
String |
formUriBasicAuthPassword()
|
Map<String,String> |
getHttpHeaders()
Retrieve HTTP headers defined by the application developer. |
String |
googleFormUrlFormat()
|
HttpSender.Method |
httpMethod()
|
boolean |
includeDropBoxSystemTags()
|
static boolean |
isNull(String aString)
|
String[] |
logcatArguments()
|
boolean |
logcatFilterByPid()
|
String |
mailTo()
|
int |
maxNumberOfRequestRetries()
|
ReportingInteractionMode |
mode()
|
HttpSender.Type |
reportType()
|
int |
resDialogCommentPrompt()
|
int |
resDialogEmailPrompt()
|
int |
resDialogIcon()
|
int |
resDialogOkToast()
|
int |
resDialogText()
|
int |
resDialogTitle()
|
int |
resNotifIcon()
|
int |
resNotifText()
|
int |
resNotifTickerText()
|
int |
resNotifTitle()
|
int |
resToastText()
|
boolean |
sendReportsInDevMode()
|
void |
setAdditionalDropboxTags(String[] additionalDropboxTags)
|
void |
setAdditionalSharedPreferences(String[] additionalSharedPreferences)
|
void |
setApplicationLogFile(String applicationLogFile)
|
void |
setApplicationLogFileLines(int applicationLogFileLines)
|
void |
setConnectionTimeout(Integer connectionTimeout)
|
void |
setCustomReportContent(ReportField[] customReportContent)
|
void |
setDeleteOldUnsentReportsOnApplicationStart(Boolean deleteOldUnsetReportsOnApplicationStart)
|
void |
setDeleteUnapprovedReportsOnApplicationStart(Boolean deleteUnapprovedReportsOnApplicationStart)
|
void |
setDisableSSLCertValidation(boolean disableSSLCertValidation)
|
void |
setDropboxCollectionMinutes(Integer dropboxCollectionMinutes)
|
void |
setExcludeMatchingSettingsKeys(String[] excludeMatchingSettingsKeys)
|
void |
setExcludeMatchingSharedPreferencesKeys(String[] excludeMatchingSharedPreferencesKeys)
|
void |
setForceCloseDialogAfterToast(Boolean forceCloseDialogAfterToast)
|
void |
setFormKey(String formKey)
Modify the formKey of the Google Docs form receiving reports. |
void |
setFormUri(String formUri)
Modify the formUri of your backend server receiving reports. |
void |
setFormUriBasicAuthLogin(String formUriBasicAuthLogin)
|
void |
setFormUriBasicAuthPassword(String formUriBasicAuthPassword)
|
void |
setHttpHeaders(Map<String,String> headers)
Set custom HTTP headers to be sent by the provided HttpSender . |
void |
setHttpMethod(HttpSender.Method httpMethod)
|
void |
setIncludeDropboxSystemTags(Boolean includeDropboxSystemTags)
|
void |
setLogcatArguments(String[] logcatArguments)
|
void |
setLogcatFilterByPid(Boolean filterByPid)
|
void |
setMailTo(String mailTo)
Modify the mailTo of the mail account receiving reports. |
void |
setMaxNumberOfRequestRetries(Integer maxNumberOfRequestRetries)
|
void |
setMode(ReportingInteractionMode mode)
Change the current ReportingInteractionMode . |
void |
setReportType(HttpSender.Type type)
|
void |
setResDialogCommentPrompt(int resId)
Use this method if the id you wanted to give to ReportsCrashes.resDialogCommentPrompt() comes from an Android
Library Project. |
void |
setResDialogEmailPrompt(int resId)
Use this method if the id you wanted to give to ReportsCrashes.resDialogEmailPrompt() comes from an Android
Library Project. |
void |
setResDialogIcon(int resId)
Use this method if the id you wanted to give to ReportsCrashes.resDialogIcon() comes from an Android Library
Project. |
void |
setResDialogOkToast(int resId)
Use this method BEFORE if the id you wanted to give to ReportsCrashes.resDialogOkToast() comes from an Android Library
Project. |
void |
setResDialogText(int resId)
Use this method if the id you wanted to give to ReportsCrashes.resDialogText() comes from an Android Library
Project. |
void |
setResDialogTitle(int resId)
Use this method if the id you wanted to give to ReportsCrashes.resDialogTitle() comes from an Android Library
Project. |
void |
setResNotifIcon(int resId)
Use this method if the id you wanted to give to ReportsCrashes.resNotifIcon() comes from an Android Library
Project. |
void |
setResNotifText(int resId)
Use this method if the id you wanted to give to ReportsCrashes.resNotifText() comes from an Android Library
Project. |
void |
setResNotifTickerText(int resId)
Use this method if the id you wanted to give to ReportsCrashes.resNotifTickerText() comes from an Android Library
Project. |
void |
setResNotifTitle(int resId)
Use this method if the id you wanted to give to ReportsCrashes.resNotifTitle() comes from an Android Library
Project. |
void |
setResToastText(int resId)
Use this method if the id you wanted to give to ReportsCrashes.resToastText() comes from an Android Library
Project. |
void |
setSendReportsInDevMode(Boolean sendReportsInDevMode)
|
void |
setSharedPreferenceMode(Integer sharedPreferenceMode)
|
void |
setSharedPreferenceName(String sharedPreferenceName)
|
void |
setSocketTimeout(Integer socketTimeout)
|
int |
sharedPreferencesMode()
|
String |
sharedPreferencesName()
|
int |
socketTimeout()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.annotation.Annotation |
---|
equals, hashCode, toString |
Constructor Detail |
---|
public ACRAConfiguration(ReportsCrashes defaults)
defaults
- Method Detail |
---|
public void 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 void setAdditionalDropboxTags(String[] additionalDropboxTags)
additionalDropboxTags
- the additionalDropboxTags to setpublic void setAdditionalSharedPreferences(String[] additionalSharedPreferences)
additionalSharedPreferences
- the additionalSharedPreferences to setpublic void setConnectionTimeout(Integer connectionTimeout)
connectionTimeout
- the connectionTimeout to setpublic void setCustomReportContent(ReportField[] customReportContent)
customReportContent
- the customReportContent to setpublic void setDeleteUnapprovedReportsOnApplicationStart(Boolean deleteUnapprovedReportsOnApplicationStart)
deleteUnapprovedReportsOnApplicationStart
- the deleteUnapprovedReportsOnApplicationStart to setpublic void setDeleteOldUnsentReportsOnApplicationStart(Boolean deleteOldUnsetReportsOnApplicationStart)
deleteOldUnsetReportsOnApplicationStart
- public void setDropboxCollectionMinutes(Integer dropboxCollectionMinutes)
dropboxCollectionMinutes
- the dropboxCollectionMinutes to setpublic void setForceCloseDialogAfterToast(Boolean forceCloseDialogAfterToast)
forceCloseDialogAfterToast
- the forceCloseDialogAfterToast to setpublic void setFormKey(String formKey)
ErrorReporter.setDefaultReportSenders()
after modifying this
value if you were not using a formKey before (a mailTo or formUri
instead).
formKey
- the formKey to setpublic void 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 void setFormUriBasicAuthLogin(String formUriBasicAuthLogin)
formUriBasicAuthLogin
- the formUriBasicAuthLogin to setpublic void setFormUriBasicAuthPassword(String formUriBasicAuthPassword)
formUriBasicAuthPassword
- the formUriBasicAuthPassword to setpublic void setIncludeDropboxSystemTags(Boolean includeDropboxSystemTags)
includeDropboxSystemTags
- the includeDropboxSystemTags to setpublic void setLogcatArguments(String[] logcatArguments)
logcatArguments
- the logcatArguments to setpublic void 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 void setMaxNumberOfRequestRetries(Integer maxNumberOfRequestRetries)
maxNumberOfRequestRetries
- the maxNumberOfRequestRetries to setpublic void 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 void setResDialogCommentPrompt(int resId)
ReportsCrashes.resDialogCommentPrompt()
comes from an Android
Library Project.
resId
- The resource id, see
ReportsCrashes.resDialogCommentPrompt()
public void setResDialogEmailPrompt(int resId)
ReportsCrashes.resDialogEmailPrompt()
comes from an Android
Library Project.
resId
- The resource id, see
ReportsCrashes.resDialogEmailPrompt()
public void setResDialogIcon(int resId)
ReportsCrashes.resDialogIcon()
comes from an Android Library
Project.
resId
- The resource id, see ReportsCrashes.resDialogIcon()
public void setResDialogOkToast(int resId)
ReportsCrashes.resDialogOkToast()
comes from an Android Library
Project.
resId
- The resource id, see ReportsCrashes.resDialogOkToast()
public void setResDialogText(int resId)
ReportsCrashes.resDialogText()
comes from an Android Library
Project.
resId
- The resource id, see ReportsCrashes.resDialogText()
public void setResDialogTitle(int resId)
ReportsCrashes.resDialogTitle()
comes from an Android Library
Project.
resId
- The resource id, see ReportsCrashes.resDialogTitle()
public void setResNotifIcon(int resId)
ReportsCrashes.resNotifIcon()
comes from an Android Library
Project.
resId
- The resource id, see ReportsCrashes.resNotifIcon()
public void setResNotifText(int resId)
ReportsCrashes.resNotifText()
comes from an Android Library
Project.
resId
- The resource id, see ReportsCrashes.resNotifText()
public void setResNotifTickerText(int resId)
ReportsCrashes.resNotifTickerText()
comes from an Android Library
Project.
resId
- The resource id, see
ReportsCrashes.resNotifTickerText()
public void setResNotifTitle(int resId)
ReportsCrashes.resNotifTitle()
comes from an Android Library
Project.
resId
- The resource id, see ReportsCrashes.resNotifTitle()
public void setResToastText(int resId)
ReportsCrashes.resToastText()
comes from an Android Library
Project.
resId
- The resource id, see ReportsCrashes.resToastText()
public void setSharedPreferenceMode(Integer sharedPreferenceMode)
sharedPreferenceMode
- the sharedPreferenceMode to setpublic void setSharedPreferenceName(String sharedPreferenceName)
sharedPreferenceName
- the sharedPreferenceName to setpublic void setSocketTimeout(Integer socketTimeout)
socketTimeout
- the socketTimeout to setpublic void setLogcatFilterByPid(Boolean filterByPid)
filterByPid
- true if you want to collect only logcat lines related to your
application process.public void setSendReportsInDevMode(Boolean sendReportsInDevMode)
sendReportsInDevMode
- false if you want to disable sending reports in development
mode. Reports will be sent only on signed applications.public void setExcludeMatchingSharedPreferencesKeys(String[] excludeMatchingSharedPreferencesKeys)
excludeMatchingSharedPreferencesKeys
- an array of Strings containing regexp defining
SharedPreferences keys that should be excluded from the data
collection.public void 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 void setApplicationLogFile(String applicationLogFile)
applicationLogFile
- The path and file name of your application log file, to be
used with ReportField.APPLICATION_LOG
.public void 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 void 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 void setHttpMethod(HttpSender.Method httpMethod)
httpMethod
- The method to be used to send data to the server.public void setReportType(HttpSender.Type type)
type
- The type of content encoding to be used to send data to the
server.public 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 formKey()
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 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 String[] excludeMatchingSharedPreferencesKeys()
public String[] excludeMatchingSettingsKeys()
public String applicationLogFile()
public int applicationLogFileLines()
public String googleFormUrlFormat()
public boolean disableSSLCertValidation()
public HttpSender.Method httpMethod()
public HttpSender.Type reportType()
public static boolean isNull(String aString)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |