| 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 retreived via
TelephonyManager as available. |
Analytics.Builder |
connectionFactory(ConnectionFactory connectionFactory)
Specify the connection factory for customizing how connections are created.
|
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 |
networkExecutor(java.util.concurrent.ExecutorService networkExecutor)
Specify the executor service for making network calls in the background.
|
Analytics.Builder |
tag(java.lang.String tag)
Set a tag for this instance.
|
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 retreived 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)
Analytics.shutdown() will not shutdown supplied executors.
Use it with care! http://bit.ly/1JVlA2epublic Analytics.Builder connectionFactory(ConnectionFactory connectionFactory)