public final class ConfigurationBuilder extends BaseConfigurationBuilder<ConfigurationBuilder>
ACRAConfiguration
.Constructor and Description |
---|
ConfigurationBuilder(android.app.Application app)
Constructs a ConfigurationBuilder that is prepopulated with any
'@ReportCrashes' annotation declared on the Application class.
|
Modifier and Type | Method and Description |
---|---|
ACRAConfiguration |
build()
Builds the
ACRAConfiguration which will be used to configure ACRA. |
ConfigurationBuilder |
setHttpHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Set custom HTTP headers to be sent by the provided
HttpSender . |
ConfigurationBuilder |
setReportField(ReportField field,
boolean enable)
Use this if you want to keep the default configuration of reportContent, but set some fields explicitly.
|
setAdditionalDropBoxTags, setAdditionalSharedPreferences, setAlsoReportToAndroidFramework, setApplicationLogFile, setApplicationLogFileDir, setApplicationLogFileLines, setAttachmentUriProvider, setAttachmentUris, setBuildConfigClass, setCertificatePath, setCertificateType, setConnectionTimeout, setCustomReportContent, setDeleteOldUnsentReportsOnApplicationStart, setDeleteUnapprovedReportsOnApplicationStart, setDropboxCollectionMinutes, setExcludeMatchingSettingsKeys, setExcludeMatchingSharedPreferencesKeys, setFormUri, setFormUriBasicAuthLogin, setFormUriBasicAuthPassword, setHttpMethod, setIncludeDropBoxSystemTags, setKeyStoreFactoryClass, setLogcatArguments, setLogcatFilterByPid, setMailTo, setNonBlockingReadForLogcat, setReportAsFile, setReportDialogClass, setReportingInteractionMode, setReportPrimerClass, setReportSenderFactoryClasses, setReportType, setResCertificate, setResDialogCommentPrompt, setResDialogEmailPrompt, setResDialogIcon, setResDialogNegativeButtonText, setResDialogOkToast, setResDialogPositiveButtonText, setResDialogText, setResDialogTheme, setResDialogTitle, setResNotifIcon, setResNotifText, setResNotifTickerText, setResNotifTitle, setResToastText, setRetryPolicyClass, setSendReportsInDevMode, setSharedPreferencesMode, setSharedPreferencesName, setSocketTimeout, setStopServicesOnCrash
public ConfigurationBuilder(@NonNull android.app.Application app)
app
- Current Application, from which any annotated config will be gleaned.@NonNull public ACRAConfiguration build() throws ACRAConfigurationException
ACRAConfiguration
which will be used to configure ACRA.
You can pass this ConfigurationBuilder
to ACRA.init(Application, ConfigurationBuilder)
and
ACRA.init(Application, ConfigurationBuilder)
will handle any Exception.
ACRAConfigurationException
- if the required values for the configured notification mode have not been provided.@NonNull public ConfigurationBuilder setReportField(@NonNull ReportField field, boolean enable)
field
- the field to setenable
- if this field should be reported@NonNull public ConfigurationBuilder setHttpHeaders(@NonNull java.util.Map<java.lang.String,java.lang.String> headers)
HttpSender
.
This should be used also by third party senders.headers
- A map associating HTTP header names to their values.