Package com.mparticle
Class MParticleOptions
- java.lang.Object
-
- com.mparticle.MParticleOptions
-
public class MParticleOptions extends java.lang.Objectclass used for passing optional settings to the SDK when it is started.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMParticleOptions.Builderstatic classMParticleOptions.DataplanOptions
-
Constructor Summary
Constructors Constructor Description MParticleOptions(MParticleOptions.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static MParticleOptions.Builderbuilder(android.content.Context context)java.lang.StringgetApiKey()Query the API Key.java.lang.StringgetApiSecret()Query the API Secret.AttributionListenergetAttributionListener()java.lang.IntegergetConfigMaxAge()<T extends Configuration>
TgetConfiguration(java.lang.Class<T> clazz)java.util.List<Configuration>getConfigurations()<T> java.util.List<Configuration<T>>getConfigurationsForTarget(java.lang.Class<T> clazz)intgetConnectionTimeout()android.content.ContextgetContext()java.lang.StringgetDataplanId()MParticleOptions.DataplanOptionsgetDataplanOptions()java.lang.IntegergetDataplanVersion()MParticle.EnvironmentgetEnvironment()Query the Environment.IdentityApiRequestgetIdentifyRequest()Query the Identify Request.BaseIdentityTaskgetIdentityTask()MParticle.InstallTypegetInstallType()Query the InstallType.com.mparticle.MParticleOptions.LocationTrackinggetLocationTracking()MParticle.LogLevelgetLogLevel()NetworkOptionsgetNetworkOptions()MParticle.OperatingSystemgetOperatingSystem()com.mparticle.internal.PushRegistrationHelper.PushRegistrationgetPushRegistration()java.lang.IntegergetSessionTimeout()java.lang.IntegergetUploadInterval()Query the uploadInterval.booleanhasLocationTracking()java.lang.BooleanisAndroidIdDisabled()Deprecated.This method has been replaced as the behavior has been inverted - Android ID collection is now disabled by default.java.lang.BooleanisAndroidIdEnabled()Query whether Android Id collection is enabled or disabled.java.lang.BooleanisDevicePerformanceMetricsDisabled()Query whether device performance metrics are enabled or disabled.java.lang.BooleanisUncaughtExceptionLoggingEnabled()
-
-
-
Constructor Detail
-
MParticleOptions
public MParticleOptions(@NonNull MParticleOptions.Builder builder)
-
-
Method Detail
-
builder
@NonNull public static MParticleOptions.Builder builder(@NonNull android.content.Context context)
- Parameters:
context-- Returns:
-
getContext
@NonNull public android.content.Context getContext()
-
getInstallType
@NonNull public MParticle.InstallType getInstallType()
Query the InstallType.
-
getEnvironment
@NonNull public MParticle.Environment getEnvironment()
Query the Environment.- Returns:
-
getApiKey
@NonNull public java.lang.String getApiKey()
Query the API Key.- Returns:
-
getApiSecret
@NonNull public java.lang.String getApiSecret()
Query the API Secret.- Returns:
-
getIdentifyRequest
@Nullable public IdentityApiRequest getIdentifyRequest()
Query the Identify Request.- Returns:
-
isDevicePerformanceMetricsDisabled
@NonNull public java.lang.Boolean isDevicePerformanceMetricsDisabled()
Query whether device performance metrics are enabled or disabled.- Returns:
- true if the are disabled, false if they are enabled
-
isAndroidIdDisabled
@NonNull @Deprecated public java.lang.Boolean isAndroidIdDisabled()
Deprecated.This method has been replaced as the behavior has been inverted - Android ID collection is now disabled by default.Use
isAndroidIdEnabled(boolean)instead. Query whether Android Id collection is enabled or disabled.- Returns:
- true if collection is disabled, false if it is enabled
-
isAndroidIdEnabled
@NonNull public java.lang.Boolean isAndroidIdEnabled()
Query whether Android Id collection is enabled or disabled.- Returns:
- true if collection is enabled, false if it is disabled
-
getUploadInterval
@NonNull public java.lang.Integer getUploadInterval()
Query the uploadInterval.- Returns:
- the upload interval, in seconds
-
getSessionTimeout
@NonNull public java.lang.Integer getSessionTimeout()
-
getConfigMaxAge
@NonNull public java.lang.Integer getConfigMaxAge()
-
isUncaughtExceptionLoggingEnabled
@NonNull public java.lang.Boolean isUncaughtExceptionLoggingEnabled()
-
getLogLevel
@NonNull public MParticle.LogLevel getLogLevel()
-
getIdentityTask
@Nullable public BaseIdentityTask getIdentityTask()
-
getAttributionListener
@Nullable public AttributionListener getAttributionListener()
-
hasLocationTracking
public boolean hasLocationTracking()
-
getLocationTracking
@Nullable public com.mparticle.MParticleOptions.LocationTracking getLocationTracking()
-
getPushRegistration
@Nullable public com.mparticle.internal.PushRegistrationHelper.PushRegistration getPushRegistration()
-
getConnectionTimeout
public int getConnectionTimeout()
-
getNetworkOptions
@NonNull public NetworkOptions getNetworkOptions()
-
getDataplanId
@Nullable public java.lang.String getDataplanId()
-
getDataplanVersion
@Nullable public java.lang.Integer getDataplanVersion()
-
getOperatingSystem
@NonNull public MParticle.OperatingSystem getOperatingSystem()
-
getDataplanOptions
@Nullable public MParticleOptions.DataplanOptions getDataplanOptions()
-
getConfigurations
@NonNull public java.util.List<Configuration> getConfigurations()
-
getConfiguration
@Nullable public <T extends Configuration> T getConfiguration(java.lang.Class<T> clazz)
-
getConfigurationsForTarget
@NonNull public <T> java.util.List<Configuration<T>> getConfigurationsForTarget(java.lang.Class<T> clazz)
-
-