public class MPConfig
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
static java.lang.String |
VERSION |
| Modifier and Type | Method and Description |
|---|---|
int |
getBulkUploadLimit() |
long |
getDataExpiration() |
boolean |
getDisableAppOpenEvent() |
boolean |
getDisableExceptionHandler() |
java.lang.String |
getEventsEndpoint() |
int |
getFlushBatchSize() |
int |
getFlushInterval() |
boolean |
getFlushOnBackground() |
java.lang.String |
getGroupsEndpoint() |
static MPConfig |
getInstance(android.content.Context context,
java.lang.String instanceName)
Retrieves a new instance of MPConfig with configuration settings loaded from the provided context.
|
java.lang.String |
getInstanceName() |
int |
getMaximumDatabaseLimit() |
int |
getMinimumDatabaseLimit() |
int |
getMinimumSessionDuration() |
OfflineMode |
getOfflineMode() |
java.lang.String |
getPeopleEndpoint() |
ProxyServerInteractor |
getProxyServerInteractor() |
boolean |
getRemoveLegacyResidualFiles() |
java.lang.String |
getResourcePackageName() |
int |
getSessionTimeoutDuration() |
javax.net.ssl.SSLSocketFactory |
getSSLSocketFactory() |
boolean |
getTrackAutomaticEvents() |
void |
setEnableLogging(boolean enableLogging) |
void |
setFlushBatchSize(int flushBatchSize) |
void |
setMaximumDatabaseLimit(int maximumDatabaseLimit) |
void |
setOfflineMode(OfflineMode offlineMode)
OfflineMode allows Mixpanel to be in-sync with client offline internal logic. |
void |
setProxyServerInteractor(ProxyServerInteractor interactor) |
void |
setServerURL(java.lang.String serverURL) |
void |
setServerURL(java.lang.String serverURL,
ProxyServerInteractor interactor) |
void |
setSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory)
The MixpanelAPI will use the system default SSL socket settings under ordinary circumstances.
|
void |
setTrackAutomaticEvents(boolean trackAutomaticEvents) |
void |
setUseIpAddressForGeolocation(boolean useIpAddressForGeolocation) |
java.lang.String |
toString() |
public static final java.lang.String VERSION
public static boolean DEBUG
public static MPConfig getInstance(android.content.Context context, @Nullable java.lang.String instanceName)
context - The context used to load Mixpanel configuration. It's recommended to provide
an ApplicationContext to avoid potential memory leaks.public void setSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory)
<pre>
MPConfig.getInstance(context).setSSLSocketFactory(someCustomizedSocketFactory);
</pre>
Your settings will be globally available to all Mixpanel instances, and will be used for
all SSL connections in the library. The call is thread safe, but should be done before
your first call to MixpanelAPI.getInstance to insure that the library never uses it's
default.
The given socket factory may be used from multiple threads, which is safe for the system
SSLSocketFactory class, but if you pass a subclass you should ensure that it is thread-safe
before passing it to Mixpanel.factory - an SSLSocketFactory thatpublic void setOfflineMode(OfflineMode offlineMode)
OfflineMode allows Mixpanel to be in-sync with client offline internal logic.
If you want to integrate your own logic with Mixpanel you'll need to call
setOfflineMode(OfflineMode) early in your code, like this
<pre>
MPConfig.getInstance(context).setOfflineMode(OfflineModeImplementation);
</pre>
Your settings will be globally available to all Mixpanel instances, and will be used across
all the library. The call is thread safe, but should be done before
your first call to MixpanelAPI.getInstance to insure that the library never uses it's
default.
The given OfflineMode may be used from multiple threads, you should ensure that
your implementation is thread-safe before passing it to Mixpanel.offlineMode - client offline implementation to use on Mixpanelpublic int getBulkUploadLimit()
public int getFlushInterval()
public boolean getFlushOnBackground()
public int getFlushBatchSize()
public void setFlushBatchSize(int flushBatchSize)
public long getDataExpiration()
public int getMinimumDatabaseLimit()
public int getMaximumDatabaseLimit()
public void setMaximumDatabaseLimit(int maximumDatabaseLimit)
public java.lang.String getInstanceName()
public boolean getDisableAppOpenEvent()
public java.lang.String getEventsEndpoint()
public boolean getTrackAutomaticEvents()
public void setServerURL(java.lang.String serverURL,
ProxyServerInteractor interactor)
public void setServerURL(java.lang.String serverURL)
public java.lang.String getPeopleEndpoint()
public java.lang.String getGroupsEndpoint()
public int getMinimumSessionDuration()
public int getSessionTimeoutDuration()
public boolean getDisableExceptionHandler()
public boolean getRemoveLegacyResidualFiles()
public void setUseIpAddressForGeolocation(boolean useIpAddressForGeolocation)
public void setEnableLogging(boolean enableLogging)
public void setTrackAutomaticEvents(boolean trackAutomaticEvents)
public java.lang.String getResourcePackageName()
public javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
public OfflineMode getOfflineMode()
public ProxyServerInteractor getProxyServerInteractor()
public void setProxyServerInteractor(ProxyServerInteractor interactor)
public java.lang.String toString()
toString in class java.lang.Object