-
public class TDConfigsdk config.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumTDConfig.ModeEnumRunning mode. The default mode is NORMAL.
public enumTDConfig.TDModeRunning mode. The default mode is NORMAL.
public enumTDConfig.TDDNSServicepublic final classTDConfig.NetworkType
-
Field Summary
Fields Modifier and Type Field Description public final static StringVERSIONpublic DNSServiceManagermDnsServiceManagerprivate volatile Stringnameprivate TDSecreteKeysecreteKeypublic final StringmTokenpublic final ContextmContextpublic booleanmEnableDNSpublic booleandisableRConfigpublic booleanmEnableAutoPushpublic booleanenableAutoCalibratedpublic List<String>backupUrlList
-
Method Summary
Modifier and Type Method Description StringgetName()voidsetName(String name)TDSecreteKeygetSecreteKey()static TDConfiggetInstance(Context context, String token)static TDConfiggetInstance(Context context, String token, String url)Obtain the TDConfig instance. static TDConfiggetInstance(Context context, String token, String url, String name)Obtain the TDConfig instance. TDConfigsetMutiprocess(boolean isSupportMultiProcess)Specifies whether data reporting by multiple processes is supported. booleanisEnableMutiprocess()Whether to allow multi-process TDConfigsetMode(TDConfig.ModeEnum mode)Set the SDK running mode. TDConfigsetMode(TDConfig.TDMode mode)Set the SDK running mode. TDConfig.ModeEnumgetMode()Obtain the current running mode of the SDK. synchronized booleanisShouldFlush(String networkType)StringgetServerUrl()StringgetCurrentServerUrl()Get the current server URL being used (primary or backup).The URL list is built dynamically: [serverUrl, backupUrl1, backupUrl2, ... voidswitchToNextUrl()Switch to the next URL in the list (for retry logic). List<String>getAllServerUrlList()Get total number of available URLs (primary + backups). StringgetDebugUrl()booleanisDebugOnly()booleanisNormal()intgetFlushInterval()intgetFlushBulkSize()TDConfigsetTrackOldData(boolean trackOldData)booleantrackOldData()synchronized TDConfigsetDefaultTimeZone(TimeZone timeZone)synchronized TimeZonegetDefaultTimeZone()TDConfigenableEncrypt(boolean enableEncrypt)TDConfigsetSecretKey(TDSecreteKey key)TDConfigenableEncrypt(int version, String publicKey)TDConfigenableDNSService(List<TDConfig.TDDNSService> lists)TDConfigenableAutoPush()synchronized TDConfigsetSSLSocketFactory(SSLSocketFactory sslSocketFactory)synchronized SSLSocketFactorygetSSLSocketFactory()-
-
Method Detail
-
getSecreteKey
TDSecreteKey getSecreteKey()
-
getInstance
static TDConfig getInstance(Context context, String token)
-
getInstance
static TDConfig getInstance(Context context, String token, String url)
Obtain the TDConfig instance. This example can be used to initialize ThinkingAnalyticsSDK. Each SDK instance corresponds to one TDConfig instance.
- Parameters:
context- app contexttoken- APP IDurl- The URL of the data receiving end must be the complete URL with the protocol; otherwise, an exception will be thrown
-
getInstance
static TDConfig getInstance(Context context, String token, String url, String name)
Obtain the TDConfig instance. This example can be used to initialize ThinkingAnalyticsSDK. Each SDK instance corresponds to one TDConfig instance.
- Parameters:
context- app contexttoken- APP IDurl- The URL of the data receiving end must be the complete URL with the protocol; otherwise, an exception will be thrownname- instance name
-
setMutiprocess
TDConfig setMutiprocess(boolean isSupportMultiProcess)
Specifies whether data reporting by multiple processes is supported. By default, data reporting by multiple processes is disabledData reporting by multiple processes has certain performance loss, and cross-process communication is a relatively slow process.
- Parameters:
isSupportMultiProcess- multiple processes is supported
-
isEnableMutiprocess
boolean isEnableMutiprocess()
Whether to allow multi-process
-
setMode
TDConfig setMode(TDConfig.ModeEnum mode)
Set the SDK running mode.
- Parameters:
mode- running mode
-
setMode
TDConfig setMode(TDConfig.TDMode mode)
Set the SDK running mode.
- Parameters:
mode- running mode
-
getMode
TDConfig.ModeEnum getMode()
Obtain the current running mode of the SDK.
-
isShouldFlush
synchronized boolean isShouldFlush(String networkType)
-
getServerUrl
String getServerUrl()
-
getCurrentServerUrl
String getCurrentServerUrl()
Get the current server URL being used (primary or backup).The URL list is built dynamically: [serverUrl, backupUrl1, backupUrl2, ...]
-
switchToNextUrl
void switchToNextUrl()
Switch to the next URL in the list (for retry logic).
-
getAllServerUrlList
List<String> getAllServerUrlList()
Get total number of available URLs (primary + backups).
-
getDebugUrl
String getDebugUrl()
-
isDebugOnly
boolean isDebugOnly()
-
isNormal
boolean isNormal()
-
getFlushInterval
int getFlushInterval()
-
getFlushBulkSize
int getFlushBulkSize()
-
setTrackOldData
TDConfig setTrackOldData(boolean trackOldData)
-
trackOldData
boolean trackOldData()
-
setDefaultTimeZone
synchronized TDConfig setDefaultTimeZone(TimeZone timeZone)
-
getDefaultTimeZone
synchronized TimeZone getDefaultTimeZone()
-
enableEncrypt
TDConfig enableEncrypt(boolean enableEncrypt)
-
setSecretKey
TDConfig setSecretKey(TDSecreteKey key)
-
enableEncrypt
TDConfig enableEncrypt(int version, String publicKey)
-
enableDNSService
TDConfig enableDNSService(List<TDConfig.TDDNSService> lists)
-
enableAutoPush
TDConfig enableAutoPush()
-
setSSLSocketFactory
synchronized TDConfig setSSLSocketFactory(SSLSocketFactory sslSocketFactory)
-
getSSLSocketFactory
synchronized SSLSocketFactory getSSLSocketFactory()
-
-
-
-