public class Options
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL_INTEGRATIONS_KEY
A special key, whose value which is respected for all integrations, a "default" value, unless
explicitly overridden.
|
Constructor and Description |
---|
Options() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
integrations()
Returns a copy of settings for integrations.
|
Options |
setIntegration(Analytics.BundledIntegration bundledIntegration,
boolean enabled)
Sets whether an action will be sent to the target integration.
|
Options |
setIntegration(java.lang.String integrationKey,
boolean enabled)
Sets whether an action will be sent to the target integration.
|
Options |
setIntegrationOptions(Analytics.BundledIntegration bundledIntegration,
java.util.Map<java.lang.String,java.lang.Object> options)
Attach some integration specific options for this call.
|
Options |
setIntegrationOptions(java.lang.String integrationKey,
java.util.Map<java.lang.String,java.lang.Object> options)
Attach some integration specific options for this call.
|
public static final java.lang.String ALL_INTEGRATIONS_KEY
setIntegration(String, boolean)
on
how to use this key.public Options setIntegration(java.lang.String integrationKey, boolean enabled)
By default, all integrations are sent a payload, and the value for the ALL_INTEGRATIONS_KEY
is true
. You can disable specific payloads.
Example: options.setIntegration("Google Analytics", false).setIntegration("Countly",
false)
will send the event to ALL integrations, except Google Analytic and Countly.
If you want to enable only specific integrations, first override the defaults and then enable specific integrations.
Example: options.setIntegration(Options.ALL_INTEGRATIONS_KEY,
false).setIntegration("Countly", true).setIntegration("Google Analytics", true)
will
only send events to ONLY Countly and Google Analytics.
integrationKey
- The integration keyenabled
- true
for enabled, false
for disabledpublic Options setIntegration(Analytics.BundledIntegration bundledIntegration, boolean enabled)
setIntegration(String, boolean)
but type safe for bundled integrations.bundledIntegration
- The target integrationenabled
- true
for enabled, false
for disabledOptions#setIntegration(String, boolean)}
public Options setIntegrationOptions(java.lang.String integrationKey, java.util.Map<java.lang.String,java.lang.Object> options)
integrationKey
- The target integration keyoptions
- A map of data that will be used by the integrationpublic Options setIntegrationOptions(Analytics.BundledIntegration bundledIntegration, java.util.Map<java.lang.String,java.lang.Object> options)
setIntegrationOptions(String, Map)
but type safe for bundled integrations.bundledIntegration
- The target integrationoptions
- A map of data that will be used by the integrationpublic java.util.Map<java.lang.String,java.lang.Object> integrations()