CrittercismConfig

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

This object is used to specify various configuration options to Workspace ONE Intelligence SDK. Once this object is set up, you can pass it to Crittercism.initialize(). After Workspace ONE Intelligence SDK is initialized, changes to this object will have no effect.

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.

Network Insights Configuration

isServiceMonitoringEnabled ()

Returns a boolean that describes whether Workspace ONE Intelligence SDK automatically instruments network monitoring.

public final boolean isServiceMonitoringEnabled ()

Returns True if Network Insights is enabled at all. Returns False otherwise.

setServiceMonitoringEnabled (isEnabled)

If this flag is set to False, then no instrumentation will be installed and the thread that sends Network Insights data will be disabled.

Default value: True (enabled)

public final void setServiceMonitoringEnabled (boolean isEnabled)

isEnabled

Determines whether Workspace ONE Intelligence SDK should automatically instrument network traffic.

Introduced in Workspace ONE Intelligence Android SDK 5.0

setOptmzEnabled (isEnabled)

If this flag is set to False, then no instrumentation will be installed and the thread that sends Network Insights data will be disabled.

Default value: True (enabled)

public final void setOptmzEnabled (boolean isEnabled)

isEnabled

Determines whether Workspace ONE Intelligence SDK should automatically instrument network traffic.

Deprecated in Android SDK 5.0

getURLBlacklistPatterns ()

Retrieve a list of blacklisted URLs. Network Insights data that pertains to URLs that match any of the patterns in the returned list will not be sent to Workspace ONE Intelligence. Patterns are case sensitive and may be any length.

public List<String> getURLBlacklistPatterns ()

Returns a copy of blacklisted URLs for which Network Insights data will not be reported to Workspace ONE Intelligence.

setURLBlacklistPatterns (patterns)

Set a list of blacklisted URLs. Network Insights data that pertains to URLs that match any of the patterns in the supplied list will not be sent to Workspace ONE Intelligence. Patterns are case sensitive and may be any length.

For example, you may provide URLs that may contain sensitive information. Note that by default all query parameters are removed before being sent to Workspace ONE Intelligence.

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 when Network Insights data is sent to Workspace ONE Intelligence. URLs that are not in this list will have their query strings removed before Network Insights data is sent to Workspace ONE Intelligence.

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 URL patterns for which the query strings will be preserved when Network Insights data is sent to Workspace ONE Intelligence. URLs that are not in this list will have their query strings removed before Network Insights data is sent to Workspace ONE Intelligence. If a URL in this list is also blacklisted, then the blacklist takes priority and network data will not be sent to Workspace ONE Intelligence 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 Insights data sent to Workspace ONE Intelligence.

public void setPreserveQueryStringPatterns (List<String> patterns)

patterns

List of URL patterns for which to preserve the query strings

Set Custom Version Name

getCustomVersionName ()

Retrieves the custom version name that will be reported to Workspace ONE Intelligence.

public final String getCustomVersionName ()

Returns the custom version name that will be reported to Workspace ONE Intelligence, or null if Workspace ONE Intelligence SDK uses the android:versionName from the AndroidManifest.xml. .

setCustomVersionName (customVersionName)

Set a custom app version that will be reported to Workspace ONE Intelligence.

By default, Workspace ONE Intelligence SDK uses the android:versionName from the AndroidManifest.xml when reporting data to Workspace ONE Intelligence. Depending on how teams version their apps, it may be desirable to set a custom version string.

public final void setCustomVersionName (String customVersionName)

customVersionName

The version name that will be reported to Workspace ONE Intelligence.

isVersionCodeToBeIncludedInVersionString ()

Returns a boolean to indicate whether Workspace ONE Intelligence SDK concatenates the app version code to the app version that will be reported to Workspace ONE Intelligence. The app’s version code is defined in android:versionCode in the AndroidManifest.xml.

public final boolean isVersionCodeToBeIncludedInVersionString ()

Returns True if the app’s version code is concatenated to the version name.

setVersionCodeToBeIncludedInVersionString (shouldIncludeVersionCode)

Tells Workspace ONE Intelligence SDK whether or not to concatenate the app version code to the app version that will be reported to Workspace ONE Intelligence. The app’s version code is defined in android:versionCode in the 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 ()

Determines if Workspace ONE Intelligence SDK delays automatic app load events until the developer calls sendAppLoadData.

By default, the return value is False and Workspace ONE Intelligence SDK automatically reports an app load event when Workspace ONE Intelligence SDK 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 boolean delaySendingAppLoad ()

Returns True if Workspace ONE Intelligence SDK should automatically send app load request. Returns False if the app will send app load request manually by calling sendAppLoadData.

setDelaySendingAppLoad (delaySendingAppLoad)

Configure delayed app load events. By default, Workspace ONE Intelligence SDK immediately reports an app load when Workspace ONE Intelligence SDK is initialized. Set delaySendingAppLoad to True if the Workspace ONE Intelligence SDK should delay sending app load events until the app developer calls sendAppLoadData. Otherwise, set it to False to keep default behavior and send app loads automatically.

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 Workspace ONE Intelligence SDK should delay automatic app loads.

Send Data On Wifi Only

allowsCellularAccess ()

Returns a boolean to determine if Workspace ONE Intelligence SDK is allowed to send data while on a cellular network.

Default value is True.

public final boolean allowsCellularAccess ()

Returns True if Workspace ONE Intelligence SDK is allowed to send data while on a cellular network. Returns False if Workspace ONE Intelligence SDK is only sending data on Wifi network.

setAllowsCellularAccess (allowsCellularAccess)

Set whether Workspace ONE Intelligence SDK sends data on cellular networks. The default value is True, which means that Workspace ONE Intelligence SDK sends data on both wifi and cellular networks. You can set it to False if Workspace ONE Intelligence SDK should only send data on wifi network.

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 Workspace ONE Intelligence SDK 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 System Log Data (Logcat)

Note

Workspace ONE Intelligence platform does not support collection of system log data (logcat). The following no-op methods are left from old Apteligent platform and have no effect on the behavior of SDK versions 6.0.0 and above.

isLogcatReportingEnabled ()

Returns a boolean to determine if system log data (logcat) is included in crashes reported by Workspace ONE Intelligence SDK to the old platform.

public final boolean isLogcatReportingEnabled ()

Returns True if system log data is included in crashes reported by Workspace ONE Intelligence SDK to the old platform.

setLogcatReportingEnabled (shouldCollectLogcat)

Set whether system log data (logcat) should be included with crashes reported by Workspace ONE Intelligence SDK to the old Apteligent platform. Note that Workspace ONE Intelligence platform does not support logcat collection. 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. Workspace ONE Intelligence SDK collects and sends the last 100 lines of logcat data to the old Apteligent platform.

public final void setLogcatReportingEnabled (boolean shouldCollectLogcat)

shouldCollectLogcat

Set to True to allow Workspace ONE Intelligence SDK to collect system log data. Set to False otherwise.