public class PinnedAmplitudeClient extends AmplitudeClient
Modifier and Type | Class and Description |
---|---|
protected static class |
PinnedAmplitudeClient.SSLContextBuilder
SSl context builder, used to generate the SSL context.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
initializedSSLSocketFactory
The Initialized ssl socket factory.
|
protected javax.net.ssl.SSLSocketFactory |
sslSocketFactory
The SSl socket factory.
|
apiKey, callFactory, context, dbHelper, DEVICE_ID_KEY, deviceId, deviceInfo, END_SESSION_EVENT, initialized, instanceName, LAST_EVENT_ID_KEY, LAST_EVENT_TIME_KEY, LAST_IDENTIFY_ID_KEY, OPT_OUT_KEY, platform, PREVIOUS_SESSION_ID_KEY, SEQUENCE_NUMBER_KEY, START_SESSION_EVENT, USER_ID_KEY, userId
Constructor and Description |
---|
PinnedAmplitudeClient(java.lang.String instance)
Instantiates a new Pinned amplitude client.
|
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
getCertificate(AmplitudeServerZone serverZone) |
static PinnedAmplitudeClient |
getInstance()
Gets the default instance.
|
static PinnedAmplitudeClient |
getInstance(java.lang.String instance)
Gets the specified instance.
|
protected static PinnedAmplitudeClient.SSLContextBuilder |
getPinnedCertificateChain(AmplitudeServerZone serverZone)
Pinned certificate chain for api.amplitude.com.
|
protected javax.net.ssl.SSLSocketFactory |
getPinnedCertSslSocketFactory(AmplitudeServerZone serverZone)
Gets pinned cert ssl socket factory.
|
protected javax.net.ssl.SSLSocketFactory |
getPinnedCertSslSocketFactory(PinnedAmplitudeClient.SSLContextBuilder context)
Gets pinned cert ssl socket factory.
|
AmplitudeClient |
initialize(android.content.Context context,
java.lang.String apiKey,
java.lang.String userId)
Initialize the Amplitude SDK with the Android application context, your Amplitude App API
key, and a user ID for the current user.
|
AmplitudeClient |
initialize(android.content.Context context,
java.lang.String apiKey,
java.lang.String userId,
Provider<OkHttpClient> clientProvider) |
AmplitudeClient |
initializeInternal(android.content.Context context,
java.lang.String apiKey,
java.lang.String userId,
Provider<OkHttpClient> clientProvider) |
AmplitudeClient |
setServerZone(AmplitudeServerZone serverZone)
Set Amplitude Server Zone, switch to zone related configuration,
including dynamic configuration and server url.
|
addEventMiddleware, bytesToHexString, clearUserProperties, contextAndApiKeySet, disableCoppaControl, disableDiagnosticLogging, disableLocationListening, enableCoppaControl, enableDiagnosticLogging, enableForegroundTracking, enableLocationListening, enableLogging, enableNewDeviceIdPerInstall, getCurrentTimeMillis, getDeviceId, getServerZone, getSessionId, getUserId, groupIdentify, groupIdentify, groupIdentify, groupIdentify, identify, identify, identify, initialize, initialize, initialize, initializeDeviceInfo, initializeInternal, isOptedOut, logEvent, logEvent, logEvent, logEvent, logEvent, logEvent, logEvent, logEvent, logEvent, logEvent, logEventAsync, logEventAsync, logEventSync, logEventSync, logEventSync, logEventSync, logEventSync, logEventSync, logRevenue, logRevenue, logRevenue, logRevenue, logRevenueV2, logRevenueV2, makeEventUploadPostRequest, mergeEventsAndIdentifys, regenerateDeviceId, replaceWithJSONNull, runOnLogThread, saveEvent, saveEvent, setBearerToken, setDeviceId, setDeviceIdCallback, setDiagnosticEventMaxCount, setEventMaxCount, setEventUploadMaxBatchSize, setEventUploadPeriodMillis, setEventUploadThreshold, setFlushEventsOnClose, setGroup, setGroup, setIdentifyBatchIntervalMillis, setIngestionMetadata, setLibraryName, setLibraryVersion, setLogCallback, setLogLevel, setMinTimeBetweenSessionsMillis, setOffline, setOptOut, setPlan, setServerUrl, setServerZone, setSessionTimeoutMillis, setTrackingOptions, setUseDynamicConfig, setUserId, setUserId, setUserProperties, setUserProperties, setUserProperties, showEventExplorer, startNewSessionIfNeeded, trackSessionEvents, truncate, truncate, truncate, updateServer, updateServer, uploadEvents, useAdvertisingIdForDeviceId, useAppSetIdForDeviceId, validateLogEvent
protected javax.net.ssl.SSLSocketFactory sslSocketFactory
protected boolean initializedSSLSocketFactory
public PinnedAmplitudeClient(java.lang.String instance)
protected static java.lang.String getCertificate(AmplitudeServerZone serverZone)
protected static PinnedAmplitudeClient.SSLContextBuilder getPinnedCertificateChain(AmplitudeServerZone serverZone)
public static PinnedAmplitudeClient getInstance()
public static PinnedAmplitudeClient getInstance(java.lang.String instance)
instance
- name to get "ex app 1"public AmplitudeClient initializeInternal(android.content.Context context, java.lang.String apiKey, java.lang.String userId, Provider<OkHttpClient> clientProvider)
public AmplitudeClient initialize(android.content.Context context, java.lang.String apiKey, java.lang.String userId)
AmplitudeClient
initialize
in class AmplitudeClient
context
- the Android application contextapiKey
- your Amplitude App API keyuserId
- the user id to setpublic AmplitudeClient initialize(android.content.Context context, java.lang.String apiKey, java.lang.String userId, Provider<OkHttpClient> clientProvider)
protected javax.net.ssl.SSLSocketFactory getPinnedCertSslSocketFactory(AmplitudeServerZone serverZone)
serverZone
- the current server zoneprotected javax.net.ssl.SSLSocketFactory getPinnedCertSslSocketFactory(PinnedAmplitudeClient.SSLContextBuilder context)
context
- the contextpublic AmplitudeClient setServerZone(AmplitudeServerZone serverZone)
AmplitudeClient
setServerZone
in class AmplitudeClient
serverZone
- AmplitudeServerZone, US or EU, default is US