public class Amplitude
extends java.lang.Object
getInstance()
have been deprecated.
Please call those methods on the AmplitudeClient instance instead, for example:
Amplitude.getInstance().logEvent();
AmplitudeClient
Constructor and Description |
---|
Amplitude() |
Modifier and Type | Method and Description |
---|---|
static void |
disableLocationListening()
Deprecated.
|
static void |
enableLocationListening()
Deprecated.
|
static void |
enableNewDeviceIdPerInstall(boolean newDeviceIdPerInstall)
Deprecated.
|
static void |
endSession()
Deprecated.
|
static java.lang.String |
getDeviceId()
Deprecated.
|
static AmplitudeClient |
getInstance()
Gets the default instance.
|
static AmplitudeClient |
getInstance(java.lang.String instance)
Gets the specified instance.
|
static void |
initialize(android.content.Context context,
java.lang.String apiKey)
Deprecated.
|
static void |
initialize(android.content.Context context,
java.lang.String apiKey,
java.lang.String userId)
Deprecated.
|
static void |
logEvent(java.lang.String eventType)
Deprecated.
|
static void |
logEvent(java.lang.String eventType,
org.json.JSONObject eventProperties)
Deprecated.
|
static void |
logRevenue(double amount)
Deprecated.
|
static void |
logRevenue(java.lang.String productId,
int quantity,
double price)
Deprecated.
|
static void |
logRevenue(java.lang.String productId,
int quantity,
double price,
java.lang.String receipt,
java.lang.String receiptSignature)
Deprecated.
|
static void |
setOptOut(boolean optOut)
Deprecated.
|
static void |
setSessionTimeoutMillis(long sessionTimeoutMillis)
Deprecated.
|
static void |
setUserId(java.lang.String userId)
Deprecated.
|
static void |
setUserProperties(org.json.JSONObject userProperties)
Deprecated.
|
static void |
setUserProperties(org.json.JSONObject userProperties,
boolean replace)
Deprecated.
|
static void |
startSession()
Deprecated.
|
static void |
uploadEvents()
Deprecated.
|
static void |
useAdvertisingIdForDeviceId()
Deprecated.
|
public static AmplitudeClient getInstance()
public static AmplitudeClient getInstance(java.lang.String instance)
instance
- name to get "ex app 1"@Deprecated public static void initialize(android.content.Context context, java.lang.String apiKey)
logEvent();
.context
- the contextapiKey
- the api key@Deprecated public static void initialize(android.content.Context context, java.lang.String apiKey, java.lang.String userId)
logEvent();
.context
- the contextapiKey
- the api keyuserId
- the user id@Deprecated public static void enableNewDeviceIdPerInstall(boolean newDeviceIdPerInstall)
newDeviceIdPerInstall
- the new device id per install@Deprecated public static void useAdvertisingIdForDeviceId()
@Deprecated public static void enableLocationListening()
@Deprecated public static void disableLocationListening()
@Deprecated public static void setSessionTimeoutMillis(long sessionTimeoutMillis)
sessionTimeoutMillis
- the session timeout millis@Deprecated public static void setOptOut(boolean optOut)
optOut
- the opt out@Deprecated public static void logEvent(java.lang.String eventType)
eventType
- the event type@Deprecated public static void logEvent(java.lang.String eventType, org.json.JSONObject eventProperties)
eventType
- the event typeeventProperties
- the event properties@Deprecated public static void uploadEvents()
@Deprecated public static void startSession()
@Deprecated public static void endSession()
@Deprecated public static void logRevenue(double amount)
amount
- the amount@Deprecated public static void logRevenue(java.lang.String productId, int quantity, double price)
productId
- the product idquantity
- the quantityprice
- the price@Deprecated public static void logRevenue(java.lang.String productId, int quantity, double price, java.lang.String receipt, java.lang.String receiptSignature)
productId
- the product idquantity
- the quantityprice
- the pricereceipt
- the receiptreceiptSignature
- the receipt signature@Deprecated public static void setUserProperties(org.json.JSONObject userProperties)
userProperties
- the user properties@Deprecated public static void setUserProperties(org.json.JSONObject userProperties, boolean replace)
userProperties
- the user propertiesreplace
- the replace@Deprecated public static void setUserId(java.lang.String userId)
userId
- the user id@Deprecated public static java.lang.String getDeviceId()