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.
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()
.
CrittercismConfig (configToCopy)
Create a copy of the input CrittercismConfig.
public CrittercismConfig ((CrittercismConfig configToCopy)
configToCopy |
|
Returns a new instance of CrittercismConfig
with the same values as configToCopy.
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 |
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. |
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. |
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 Permissions Required.
public final void setAllowsCellularAccess (boolean allowsCellularAccess)
allowsCellularAccess |
Set to |
Introduced in Android SDK 5.7.0
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 |
setCachingModeEnabled ()
In the Caching mode, the Intelligence SDK will cache events until the application is able to authenticate within in a 5 minute grace period. After 5 minutes, if we still haven’t authenticated, the Intel SDK will drop into the unauthenticated state and send event to the developer endpoint.
When Caching mode disabled, events will not wait for authentication and will instead send events to the current state endpoint. This means that if Caching mode disabled, and events are recorded while the SDK is trying to authenticate, they will be sent to the unauthenticated endpoint immediately. This can result in data not showing up on the in App Owner / Tenant Region Intelligence Consoles if not used correctly.
Default value is True
.
public final void setCachingModeEnabled(boolean cachingModeEnabled)
Examples
Methods: boolean isCachingModeEnabled(), void setCachingModeEnabled(final boolean enabled)
CrittercismConfig config = new CrittercismConfig();
config.setCachingModeEnabled(false);
val config = CrittercismConfig()
config.isCachingModeEnabled = true
isCachingModeEnabled ()
Returns a boolean to determine if caching mode is set.
public final boolean isCachingModeEnabled()
Examples
Methods: boolean isCachingModeEnabled(), void setCachingModeEnabled(final boolean enabled)
CrittercismConfig config = new CrittercismConfig();
config.setCachingModeEnabled(false);
boolean cachingModeEnabled = config.isCachingModeEnabled();
val config = CrittercismConfig()
config.isCachingModeEnabled = true
val cachingModeEnabled = config.isCachingModeEnabled