Constructor and Description |
---|
Builder(android.content.Context context,
java.lang.String writeKey)
Start building a new
Analytics instance. |
Modifier and Type | Method and Description |
---|---|
Analytics |
build()
Create a
Analytics client. |
Analytics.Builder |
collectDeviceId(boolean collect)
Enable or disable collection of
Settings.Secure.ANDROID_ID , Build.SERIAL or the Telephony Identifier retrieved via TelephonyManager as
available. |
Analytics.Builder |
connectionFactory(ConnectionFactory connectionFactory)
Specify the connection factory for customizing how connections are created.
|
Analytics.Builder |
crypto(Crypto crypto)
Specify the crypto interface for customizing how data is stored at rest.
|
Analytics.Builder |
defaultOptions(Options defaultOptions)
Set some default options for all calls.
|
Analytics.Builder |
disableBundledIntegrations()
Deprecated.
As of
3.0.1 , this method does nothing. |
Analytics.Builder |
flushInterval(long flushInterval,
java.util.concurrent.TimeUnit timeUnit)
Set the interval at which the client should flush events.
|
Analytics.Builder |
flushQueueSize(int flushQueueSize)
Set the queue size at which the client should flush events.
|
Analytics.Builder |
logLevel(Analytics.LogLevel logLevel)
Set a
Analytics.LogLevel for this instance. |
Analytics.Builder |
middleware(Middleware middleware)
Add a
Middleware for intercepting messages. |
Analytics.Builder |
networkExecutor(java.util.concurrent.ExecutorService networkExecutor)
Specify the executor service for making network calls in the background.
|
Analytics.Builder |
recordScreenViews()
Automatically record screen calls when activities are created.
|
Analytics.Builder |
tag(java.lang.String tag)
Set a tag for this instance.
|
Analytics.Builder |
trackApplicationLifecycleEvents()
Automatically track application lifecycle events, including "Application Installed",
"Application Updated" and "Application Opened".
|
Analytics.Builder |
trackAttributionInformation()
THIS FEATURE IS DISABLED.
|
Analytics.Builder |
use(Integration.Factory factory)
TODO: docs
|
public Builder(android.content.Context context, java.lang.String writeKey)
Analytics
instance.public Analytics.Builder flushQueueSize(int flushQueueSize)
flushQueueSize
.java.lang.IllegalArgumentException
- if the flushQueueSize is less than or equal to zero.public Analytics.Builder flushInterval(long flushInterval, java.util.concurrent.TimeUnit timeUnit)
flushInterval
duration, regardless of flushQueueSize
.java.lang.IllegalArgumentException
- if the flushInterval is less than or equal to zero.public Analytics.Builder collectDeviceId(boolean collect)
Settings.Secure.ANDROID_ID
, Build.SERIAL
or the Telephony Identifier retrieved via TelephonyManager as
available. Collection of the device identifier is enabled by default.public Analytics.Builder defaultOptions(Options defaultOptions)
Options
public Analytics.Builder tag(java.lang.String tag)
java.lang.IllegalArgumentException
- if the tag is null or empty.public Analytics.Builder logLevel(Analytics.LogLevel logLevel)
Analytics.LogLevel
for this instance.@Deprecated public Analytics.Builder disableBundledIntegrations()
3.0.1
, this method does nothing.public Analytics.Builder networkExecutor(java.util.concurrent.ExecutorService networkExecutor)
Note: Calling Analytics.shutdown()
will not shutdown supplied executors.
Use it with care! http://bit.ly/1JVlA2e
public Analytics.Builder connectionFactory(ConnectionFactory connectionFactory)
This is a beta API, and might be changed in the future. Use it with care! http://bit.ly/1JVlA2e
public Analytics.Builder crypto(Crypto crypto)
public Analytics.Builder use(Integration.Factory factory)
public Analytics.Builder trackApplicationLifecycleEvents()
public Analytics.Builder recordScreenViews()
public Analytics.Builder trackAttributionInformation()
public Analytics.Builder middleware(Middleware middleware)
Middleware
for intercepting messages.