Back to Acra

ACRAConfiguration (Application Crash Report for Android 4.5.0 API)

web/static/javadoc/4.5.0/org/acra/ACRAConfiguration.html

latest32.1 KB
Original Source

|

| Overview | Package | Class | Use | Tree | Deprecated | Index | Help |

| | | PREV CLASS NEXT CLASS | FRAMES NO FRAMES | | SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


org.acra Class ACRAConfiguration

[java.lang.Object](http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true "class or interface in java.lang") ![extended by](../../resources/inherit.gif) **org.acra.ACRAConfiguration**

All Implemented Interfaces: Annotation, ReportsCrashes


public class **ACRAConfiguration**

extends Objectimplements ReportsCrashes

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[]
String[]
Class<? extends Annotation>
String
int
int
ReportField[]
boolean
boolean
boolean
int
String[]
String[]
boolean
String
String
String
String
Map<String,String>
Retrieve HTTP headers defined by the application developer.
String
HttpSender.Method
boolean
static boolean
String[]
boolean
String
int
ReportingInteractionMode
HttpSender.Type
int
int
int
int
int
int
int
int
int
int
int
boolean
void
void
void
void
void
void
void
void
void
void
void
void
void
void
Modify the formKey of the Google Docs form receiving reports.
void
Modify the formUri of your backend server receiving reports.
void
void
void
Set custom HTTP headers to be sent by the provided HttpSender.
void
void
void
void
void
Modify the mailTo of the mail account receiving reports.
void
void
Change the current ReportingInteractionMode.
void
void
Use this method if the id you wanted to give to ReportsCrashes.resDialogCommentPrompt() comes from an Android Library Project.
void
Use this method if the id you wanted to give to ReportsCrashes.resDialogEmailPrompt() comes from an Android Library Project.
void
Use this method if the id you wanted to give to ReportsCrashes.resDialogIcon() comes from an Android Library Project.
void
Use this method BEFORE if the id you wanted to give to ReportsCrashes.resDialogOkToast() comes from an Android Library Project.
void
Use this method if the id you wanted to give to ReportsCrashes.resDialogText() comes from an Android Library Project.
void
Use this method if the id you wanted to give to ReportsCrashes.resDialogTitle() comes from an Android Library Project.
void
Use this method if the id you wanted to give to ReportsCrashes.resNotifIcon() comes from an Android Library Project.
void
Use this method if the id you wanted to give to ReportsCrashes.resNotifText() comes from an Android Library Project.
void
Use this method if the id you wanted to give to ReportsCrashes.resNotifTickerText() comes from an Android Library Project.
void
Use this method if the id you wanted to give to ReportsCrashes.resNotifTitle() comes from an Android Library Project.
void
Use this method if the id you wanted to give to ReportsCrashes.resToastText() comes from an Android Library Project.
void
void
void
void
int
String
int
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

ACRAConfiguration

public **ACRAConfiguration** ([ReportsCrashes](../../org/acra/annotation/ReportsCrashes.html "annotation in org.acra.annotation")defaults)

Parameters: defaults -

Method Detail

setHttpHeaders

public void **setHttpHeaders** ([Map](http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true "class or interface in java.util")<[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang"),[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")> headers)

Set custom HTTP headers to be sent by the provided HttpSender. This should be used also by third party senders.

Parameters: headers - A map associating HTTP header names to their values.


getHttpHeaders

public[Map](http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true "class or interface in java.util")<[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang"),[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")> **getHttpHeaders** ()

Retrieve HTTP headers defined by the application developer. These should be added to requests sent by any third-party sender (over HTTP of course).

Returns: A map associating http header names to their values.


setAdditionalDropboxTags

public void **setAdditionalDropboxTags** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")[] additionalDropboxTags)

Parameters: additionalDropboxTags - the additionalDropboxTags to set


setAdditionalSharedPreferences

public void **setAdditionalSharedPreferences** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")[] additionalSharedPreferences)

Parameters: additionalSharedPreferences - the additionalSharedPreferences to set


setConnectionTimeout

public void **setConnectionTimeout** ([Integer](http://java.sun.com/javase/6/docs/api/java/lang/Integer.html?is-external=true "class or interface in java.lang")connectionTimeout)

Parameters: connectionTimeout - the connectionTimeout to set


setCustomReportContent

public void **setCustomReportContent** ([ReportField](../../org/acra/ReportField.html "enum in org.acra")[] customReportContent)

Parameters: customReportContent - the customReportContent to set


setDeleteUnapprovedReportsOnApplicationStart

public void **setDeleteUnapprovedReportsOnApplicationStart** ([Boolean](http://java.sun.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true "class or interface in java.lang")deleteUnapprovedReportsOnApplicationStart)

Parameters: deleteUnapprovedReportsOnApplicationStart - the deleteUnapprovedReportsOnApplicationStart to set


setDeleteOldUnsentReportsOnApplicationStart

public void **setDeleteOldUnsentReportsOnApplicationStart** ([Boolean](http://java.sun.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true "class or interface in java.lang")deleteOldUnsetReportsOnApplicationStart)

Parameters: deleteOldUnsetReportsOnApplicationStart -


setDropboxCollectionMinutes

public void **setDropboxCollectionMinutes** ([Integer](http://java.sun.com/javase/6/docs/api/java/lang/Integer.html?is-external=true "class or interface in java.lang")dropboxCollectionMinutes)

Parameters: dropboxCollectionMinutes - the dropboxCollectionMinutes to set


setForceCloseDialogAfterToast

public void **setForceCloseDialogAfterToast** ([Boolean](http://java.sun.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true "class or interface in java.lang")forceCloseDialogAfterToast)

Parameters: forceCloseDialogAfterToast - the forceCloseDialogAfterToast to set


setFormKey

public void **setFormKey** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")formKey)

Modify the formKey of the Google Docs form receiving reports. You need to call ErrorReporter.setDefaultReportSenders() after modifying this value if you were not using a formKey before (a mailTo or formUri instead).

Parameters: formKey - the formKey to set


setFormUri

public void **setFormUri** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")formUri)

Modify the formUri of your backend server receiving reports. You need to call ErrorReporter.setDefaultReportSenders() after modifying this value if you were not using a formUri before (a mailTo or formKey instead).

Parameters: formUri - the formUri to set


setFormUriBasicAuthLogin

public void **setFormUriBasicAuthLogin** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")formUriBasicAuthLogin)

Parameters: formUriBasicAuthLogin - the formUriBasicAuthLogin to set


setFormUriBasicAuthPassword

public void **setFormUriBasicAuthPassword** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")formUriBasicAuthPassword)

Parameters: formUriBasicAuthPassword - the formUriBasicAuthPassword to set


setIncludeDropboxSystemTags

public void **setIncludeDropboxSystemTags** ([Boolean](http://java.sun.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true "class or interface in java.lang")includeDropboxSystemTags)

Parameters: includeDropboxSystemTags - the includeDropboxSystemTags to set


setLogcatArguments

public void **setLogcatArguments** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")[] logcatArguments)

Parameters: logcatArguments - the logcatArguments to set


setMailTo

public void **setMailTo** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")mailTo)

Modify the mailTo of the mail account receiving reports. You need to call ErrorReporter.setDefaultReportSenders() after modifying this value if you were not using a formKey before (a formKey or formUri instead).

Parameters: mailTo - the mailTo to set


setMaxNumberOfRequestRetries

public void **setMaxNumberOfRequestRetries** ([Integer](http://java.sun.com/javase/6/docs/api/java/lang/Integer.html?is-external=true "class or interface in java.lang")maxNumberOfRequestRetries)

Parameters: maxNumberOfRequestRetries - the maxNumberOfRequestRetries to set


setMode

public void **setMode** ([ReportingInteractionMode](../../org/acra/ReportingInteractionMode.html "enum in org.acra")mode)
             throws[ACRAConfigurationException](../../org/acra/ACRAConfigurationException.html "class in org.acra")

Change the current ReportingInteractionMode. You must set required configuration items first.

Parameters: mode - the new mode to set. Throws: ACRAConfigurationException - if a configuration item is missing for this mode.


setResDialogCommentPrompt

public void **setResDialogCommentPrompt** (int resId)

Use this method if the id you wanted to give to ReportsCrashes.resDialogCommentPrompt() comes from an Android Library Project.

Parameters: resId - The resource id, see ReportsCrashes.resDialogCommentPrompt()


setResDialogEmailPrompt

public void **setResDialogEmailPrompt** (int resId)

Use this method if the id you wanted to give to ReportsCrashes.resDialogEmailPrompt() comes from an Android Library Project.

Parameters: resId - The resource id, see ReportsCrashes.resDialogEmailPrompt()


setResDialogIcon

public void **setResDialogIcon** (int resId)

Use this method if the id you wanted to give to ReportsCrashes.resDialogIcon() comes from an Android Library Project.

Parameters: resId - The resource id, see ReportsCrashes.resDialogIcon()


setResDialogOkToast

public void **setResDialogOkToast** (int resId)

Use this method BEFORE if the id you wanted to give to ReportsCrashes.resDialogOkToast() comes from an Android Library Project.

Parameters: resId - The resource id, see ReportsCrashes.resDialogOkToast()


setResDialogText

public void **setResDialogText** (int resId)

Use this method if the id you wanted to give to ReportsCrashes.resDialogText() comes from an Android Library Project.

Parameters: resId - The resource id, see ReportsCrashes.resDialogText()


setResDialogTitle

public void **setResDialogTitle** (int resId)

Use this method if the id you wanted to give to ReportsCrashes.resDialogTitle() comes from an Android Library Project.

Parameters: resId - The resource id, see ReportsCrashes.resDialogTitle()


setResNotifIcon

public void **setResNotifIcon** (int resId)

Use this method if the id you wanted to give to ReportsCrashes.resNotifIcon() comes from an Android Library Project.

Parameters: resId - The resource id, see ReportsCrashes.resNotifIcon()


setResNotifText

public void **setResNotifText** (int resId)

Use this method if the id you wanted to give to ReportsCrashes.resNotifText() comes from an Android Library Project.

Parameters: resId - The resource id, see ReportsCrashes.resNotifText()


setResNotifTickerText

public void **setResNotifTickerText** (int resId)

Use this method if the id you wanted to give to ReportsCrashes.resNotifTickerText() comes from an Android Library Project.

Parameters: resId - The resource id, see ReportsCrashes.resNotifTickerText()


setResNotifTitle

public void **setResNotifTitle** (int resId)

Use this method if the id you wanted to give to ReportsCrashes.resNotifTitle() comes from an Android Library Project.

Parameters: resId - The resource id, see ReportsCrashes.resNotifTitle()


setResToastText

public void **setResToastText** (int resId)

Use this method if the id you wanted to give to ReportsCrashes.resToastText() comes from an Android Library Project.

Parameters: resId - The resource id, see ReportsCrashes.resToastText()


setSharedPreferenceMode

public void **setSharedPreferenceMode** ([Integer](http://java.sun.com/javase/6/docs/api/java/lang/Integer.html?is-external=true "class or interface in java.lang")sharedPreferenceMode)

Parameters: sharedPreferenceMode - the sharedPreferenceMode to set


setSharedPreferenceName

public void **setSharedPreferenceName** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")sharedPreferenceName)

Parameters: sharedPreferenceName - the sharedPreferenceName to set


setSocketTimeout

public void **setSocketTimeout** ([Integer](http://java.sun.com/javase/6/docs/api/java/lang/Integer.html?is-external=true "class or interface in java.lang")socketTimeout)

Parameters: socketTimeout - the socketTimeout to set


setLogcatFilterByPid

public void **setLogcatFilterByPid** ([Boolean](http://java.sun.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true "class or interface in java.lang")filterByPid)

Parameters: filterByPid - true if you want to collect only logcat lines related to your application process.


setSendReportsInDevMode

public void **setSendReportsInDevMode** ([Boolean](http://java.sun.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true "class or interface in java.lang")sendReportsInDevMode)

Parameters: sendReportsInDevMode - false if you want to disable sending reports in development mode. Reports will be sent only on signed applications.


setExcludeMatchingSharedPreferencesKeys

public void **setExcludeMatchingSharedPreferencesKeys** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")[] excludeMatchingSharedPreferencesKeys)

Parameters: excludeMatchingSharedPreferencesKeys - an array of Strings containing regexp defining SharedPreferences keys that should be excluded from the data collection.


setExcludeMatchingSettingsKeys

public void **setExcludeMatchingSettingsKeys** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")[] excludeMatchingSettingsKeys)

Parameters: excludeMatchingSettingsKeys - an array of Strings containing regexp defining Settings.System, Settings.Secure and Settings.Global keys that should be excluded from the data collection.


setApplicationLogFile

public void **setApplicationLogFile** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")applicationLogFile)

Parameters: applicationLogFile - The path and file name of your application log file, to be used with ReportField.APPLICATION_LOG.


setApplicationLogFileLines

public void **setApplicationLogFileLines** (int applicationLogFileLines)

Parameters: applicationLogFileLines - The number of lines of your application log to be collected, to be used with ReportField.APPLICATION_LOG and ReportsCrashes.applicationLogFile().


setDisableSSLCertValidation

public void **setDisableSSLCertValidation** (boolean disableSSLCertValidation)

Parameters: disableSSLCertValidation - Set this to true if you need to send reports to a server over SSL using a self-signed certificate.


setHttpMethod

public void **setHttpMethod** ([HttpSender.Method](../../org/acra/sender/HttpSender.Method.html "enum in org.acra.sender")httpMethod)

Parameters: httpMethod - The method to be used to send data to the server.


setReportType

public void **setReportType** ([HttpSender.Type](../../org/acra/sender/HttpSender.Type.html "enum in org.acra.sender")type)

Parameters: type - The type of content encoding to be used to send data to the server.


additionalDropBoxTags

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")[] **additionalDropBoxTags** ()

additionalSharedPreferences

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")[] **additionalSharedPreferences** ()

annotationType

public[Class](http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true "class or interface in java.lang")<? extends[Annotation](http://java.sun.com/javase/6/docs/api/java/lang/annotation/Annotation.html?is-external=true "class or interface in java.lang.annotation")> **annotationType** ()

Specified by: annotationType in interface Annotation


connectionTimeout

public int **connectionTimeout** ()

customReportContent

public[ReportField](../../org/acra/ReportField.html "enum in org.acra")[] **customReportContent** ()

deleteUnapprovedReportsOnApplicationStart

public boolean **deleteUnapprovedReportsOnApplicationStart** ()

deleteOldUnsentReportsOnApplicationStart

public boolean **deleteOldUnsentReportsOnApplicationStart** ()

dropboxCollectionMinutes

public int **dropboxCollectionMinutes** ()

forceCloseDialogAfterToast

public boolean **forceCloseDialogAfterToast** ()

formKey

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang") **formKey** ()

formUri

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang") **formUri** ()

formUriBasicAuthLogin

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang") **formUriBasicAuthLogin** ()

formUriBasicAuthPassword

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang") **formUriBasicAuthPassword** ()

includeDropBoxSystemTags

public boolean **includeDropBoxSystemTags** ()

logcatArguments

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")[] **logcatArguments** ()

mailTo

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang") **mailTo** ()

maxNumberOfRequestRetries

public int **maxNumberOfRequestRetries** ()

mode

public[ReportingInteractionMode](../../org/acra/ReportingInteractionMode.html "enum in org.acra") **mode** ()

resDialogCommentPrompt

public int **resDialogCommentPrompt** ()

resDialogEmailPrompt

public int **resDialogEmailPrompt** ()

resDialogIcon

public int **resDialogIcon** ()

resDialogOkToast

public int **resDialogOkToast** ()

resDialogText

public int **resDialogText** ()

resDialogTitle

public int **resDialogTitle** ()

resNotifIcon

public int **resNotifIcon** ()

resNotifText

public int **resNotifText** ()

resNotifTickerText

public int **resNotifTickerText** ()

resNotifTitle

public int **resNotifTitle** ()

resToastText

public int **resToastText** ()

sharedPreferencesMode

public int **sharedPreferencesMode** ()

sharedPreferencesName

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang") **sharedPreferencesName** ()

socketTimeout

public int **socketTimeout** ()

logcatFilterByPid

public boolean **logcatFilterByPid** ()

sendReportsInDevMode

public boolean **sendReportsInDevMode** ()

excludeMatchingSharedPreferencesKeys

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")[] **excludeMatchingSharedPreferencesKeys** ()

excludeMatchingSettingsKeys

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")[] **excludeMatchingSettingsKeys** ()

applicationLogFile

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang") **applicationLogFile** ()

applicationLogFileLines

public int **applicationLogFileLines** ()

googleFormUrlFormat

public[String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang") **googleFormUrlFormat** ()

disableSSLCertValidation

public boolean **disableSSLCertValidation** ()

httpMethod

public[HttpSender.Method](../../org/acra/sender/HttpSender.Method.html "enum in org.acra.sender") **httpMethod** ()

reportType

public[HttpSender.Type](../../org/acra/sender/HttpSender.Type.html "enum in org.acra.sender") **reportType** ()

isNull

public static boolean **isNull** ([String](http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true "class or interface in java.lang")aString)

|

| Overview | Package | Class | Use | Tree | Deprecated | Index | Help |

| | | PREV CLASS NEXT CLASS | FRAMES NO FRAMES | | SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Copyright © 2010-2013. All Rights Reserved.