CrittercismConfig

Import com.crittercism.app package to use this class.

This object is used to specify various configuration options to Apteligent. Once this object is setup, you can pass it to Crittercism.initialize(). After Apteligent is initialized, changes to this object will have no affect.

Creating a Config

CrittercismConfig ()
Creates a new CrittercismConfig object with the default values for the above properties. You can modify the config values and pass this object into Crittercism.initialize().
public CrittercismConfig ()
Returns CrittercismConfig with default values.
CrittercismConfig (configToCopy)
Create a copy of the input CrittercismConfig.
public CrittercismConfig ((CrittercismConfig configToCopy)
configToCopy CrittercismConfig to copy
Returns a new instance of CrittercismConfig with the same values as configToCopy.

Service Monitoring Configuration

isServiceMonitoringEnabled ()
Returns a boolean that describes whether Apteligent automatically instruments network monitoring.
public final boolean isServiceMonitoringEnabled ()
Returns True if Apteligent is automatically instrumenting service monitoring. Returns False otherwise.
setServiceMonitoringEnabled (isServiceMonitoringEnabled)

Determines whether Apteligent service monitoring is enabled at all. If this flag is set to False, then no instrumentation will be installed and the thread that sends service monitoring data will be disabled

Default value: True (enabled)

public final void setServiceMonitoringEnabled (boolean isServiceMonitoringEnabled)
isServiceMonitoringEnabled Determines whether Apteligent should automatically instrument network traffic
Introduced in Android SDK 5.0
setOptmzEnabled (isServiceMonitoringEnabled)

Determines whether Apteligent service monitoring is enabled at all. If this flag is set to False, then no instrumentation will be installed and the thread that sends service monitoring data will be disabled

Default value: True (enabled)

public final void setServiceMonitoringEnabled (boolean isServiceMonitoringEnabled)
isServiceMonitoringEnabled Determines whether Apteligent should automatically instrument network traffic
Deprecated in Android SDK 5.0
getURLBlacklistPatterns ()

An list of blacklisted URLs. These filters are used to make it so certain network performance information is not reported to Apteligent, for example URLs that may contain sensitive information.

These filters can also be used to prevent URL query parameters from being stripped out. By default all query parameters are removed before being sent to Apteligent.

public List<String> getURLBlacklistPatterns ()
Returns a copy of blacklisted URLs that will not be reported to Crittercism APM.
setURLBlacklistPatterns (patterns)

Set a list of patterns to use for filtering which network statistics are sent to Apteligent. Statistics that pertain to URLs that match any of the patterns in the supplied list will not be sent to Apteligent.

Patterns are case sensitive and may be any length. A zero length string will result in all query strings being included in network data sent to Apteligent.

public void setURLBlacklistPatterns (List<String> patterns)
patterns List of URL patterns to blacklist
getPreserveQueryStringPatterns ()
Returns a copy of the list of URL string patterns for which the query strings will be preserved. URLs that are not in this list will have their query strings removed before network statistics are sent to Apteligent.
public List<String> getPreserveQueryStringPatterns ()
Returns a copy of the list of URL string patterns for which the query strings will be preserved.
setPreserveQueryStringPatterns (patterns)

Set a list of patterns for which to preserve the query string when network statistics are sent to Apteligent. If a URL in this list is also blacklisted, then the blacklist takes priority and network data will not be sent to Apteligent for that URL.

Patterns are case sensitive and may be any length. A zero length string will result in all query strings being included in network data sent to Apteligent.

public void setPreserveQueryStringPatterns (List<String> patterns)
patterns List of URL patterns for which to preserve the query strings

Set Custom Version Name

getCustomVersionName ()
Returns the version name to be reported to Apteligent server.
public final String getCustomVersionName ()
Returns the version name that will be reported to Apteligent server.
setCustomVersionName (customVersionName)

Use this method to customize the app version that is reported to Apteligent.

By default, Apteligent uses the android:versionName from the AndroidManifest.xml when reporting data to Apteligent. Depending on how teams version their apps, it may be desirable to set a custom version string or to also include the android:versionCode from the AndroidManifest.xml. This setting must be set at Apteligent initialization time.

public final void setCustomVersionName (String customVersionName)
customVersionName The version name that will be reported to Apteligent server
isVersionCodeToBeIncludedInVersionString ()
Returns a boolean to indicate whether Apteligent should report the app version code as part of the app version that is reported to Apteligent. The app’s version code is defined in AndroidManifest.xml.
public final boolean isVersionCodeToBeIncludedInVersionString ()
Returns True if the app’s version code should be concatenated to the version name.
setVersionCodeToBeIncludedInVersionString (shouldIncludeVersionCode)
Tells Apteligent whether or not to report the app version code as part of the app version that is reported to Apteligent. The app’s version code is defined in AndroidManifest.xml.
public final void setVersionCodeToBeIncludedInVersionString (boolean shouldIncludeVersionCode)
shouldIncludeVersionCode True if the app’s version code should be concatenated to the version name

Delay App Load Configuration

delaySendingAppLoad ()

Returns a boolean whether Apteligent automatically send app load request or the app will decide when app load request should be sent by calling sendAppLoadData.

By default, Apteligent immediately reports an app load when Apteligent is initialized. The delay app load feature is most often used to delay counting an app load until after a user has passed a login screen.

Default value: False (Apteligent will automatically send app load request)

public final boolean delaySendingAppLoad ()
Returns True if Apteligent should automatically send app load request. Returns False if the app will send app load request manually by calling sendAppLoadData.
setDelaySendingAppLoad (delaySendingAppLoad)

Set delaySendingAppLoad to False if Apteligent should automatically send app load request. Otherwise, set it to True if the app will decide when app load request should be sent by calling sendAppLoadData.

By default, Apteligent immediately reports an app load when Apteligent is initialized. The delay app load feature is most often used to delay counting an app load until after a user has passed a login screen.

public final void setDelaySendingAppLoad (boolean delaySendingAppLoad)
delaySendingAppLoad A boolean to indicate whether Apteligent should automatically send app load request or the app will decide when app load request manually

Send Data On Wifi Only

allowsCellularAccess ()

Returns a boolean to determine if Apteligent is allowed to send data while on a cellular network.

Default value is True.

public final boolean allowsCellularAccess ()
Returns True if Apteligent is allowed to send data while on a cellular network. Returns False if Apteligent is only sending data on Wifi network.
setAllowsCellularAccess (allowsCellularAccess)

By default, Apteligent sends data on wifi and cellular networks. You can set Apteligent to send data only when the device is on wifi networks.

This feature requires adding the ACCESS_NETWORK_STATE permission to your AndroidManifest.xml. Please see Setting Up the Manifest above.

public final void setAllowsCellularAccess (boolean allowsCellularAccess)
allowsCellularAccess Set to True to allow Apteligent to send data on a cellular network. Set to False to allow sending data on wifi only.
Introduced in Android SDK 5.7.0

Include Logcat

isLogcatReportingEnabled ()
Returns a boolean to determine if Apteligent should collect system log cat.
public final boolean isLogcatReportingEnabled ()
setLogcatReportingEnabled (shouldCollectLogcat)
Including system log data (Logcat) can be helpful for debugging crashes and handled exceptions, but it comes at the cost of slightly increasing disk and network usage, which is why this feature must be manually enabled. Apteligent collects the last 100 lines of logcat data.
public final void setLogcatReportingEnabled (boolean shouldCollectLogcat)
shouldCollectLogcat Set to True to allow Apteligent to collect system log cat. Set to False otherwise.