Package com.treasuredata.android
Class TreasureData
- java.lang.Object
-
- com.treasuredata.android.TreasureData
-
-
Constructor Summary
Constructors Constructor Description TreasureData(android.content.Context context, java.lang.String apiKey, java.lang.String apiEndpoint)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEvent(java.lang.String database, java.lang.String table, java.util.Map<java.lang.String,java.lang.Object> record)
Track a new eventvoid
addEvent(java.lang.String table, java.util.Map<java.lang.String,java.lang.Object> record)
Track a new event to default database set bysetDefaultDatabase(String)
void
addEventWithCallback(java.lang.String database, java.lang.String table, java.util.Map<java.lang.String,java.lang.Object> origRecord, TDCallback callback)
Track a new eventvoid
addEventWithCallback(java.lang.String table, java.util.Map<java.lang.String,java.lang.Object> record, TDCallback callback)
Track a new event to default database set bysetDefaultDatabase(String)
void
appendAppInformation(java.util.Map<java.lang.String,java.lang.Object> record)
void
appendLocaleInformation(java.util.Map<java.lang.String,java.lang.Object> record)
void
appendLocalTimeStamp(java.util.Map<java.lang.String,java.lang.Object> record)
void
appendModelInformation(java.util.Map<java.lang.String,java.lang.Object> record)
void
appendRecordUUID(java.util.Map<java.lang.String,java.lang.Object> record)
void
appendSessionId(java.util.Map<java.lang.String,java.lang.Object> record)
void
appendUniqId(java.util.Map<java.lang.String,java.lang.Object> record)
void
clearFirstRun(android.content.Context context)
void
disableAppInstalledEvent()
Disable automatic tracking of event when app is installedvoid
disableAppLifecycleEvent()
Disable app lifecycle tracking.void
disableAppOpenEvent()
Disable automatic tracking of event when app is openedvoid
disableAppUpdatedEvent()
Disable automatic tracking of event when app is updatedvoid
disableAutoAppendAdvertisingIdentifier()
Disable automatic tracking of advertising identifiervoid
disableAutoAppendAppInformation()
Disable automatic tracking of app informationvoid
disableAutoAppendLocaleInformation()
Disable automatic tracking of locale informationvoid
disableAutoAppendLocalTimestamp()
Disable automatic tracking of local timestampvoid
disableAutoAppendModelInformation()
Disable automatic tracking of model informationvoid
disableAutoAppendRecordUUID()
Disable appending ID for each event.void
disableAutoAppendUniqId()
Disable the automatically appended `td_uuid` column.void
disableAutoRetryUploading()
Disable automatic retry uploading.void
disableCustomEvent()
Disable custom event tracking.static void
disableEventCompression()
Event data will be uploaded in it's full format.void
disableInAppPurchaseEvent()
Enable tracking In App Purchase event automatically.static void
disableLogging()
Disable client's loggingvoid
enableAppLifecycleEvent()
Enable app lifecycle tracking.void
enableAppLifecycleEvent(boolean enabled)
Toggle app lifecycle tracking.void
enableAutoAppendAdvertisingIdentifier()
Enable automatic tracking of advertising identifiervoid
enableAutoAppendAdvertisingIdentifier(java.lang.String columnName)
Enable automatic tracking of advertising identifier with custom column namevoid
enableAutoAppendAppInformation()
Enable automatic tracking of app informationvoid
enableAutoAppendLocaleInformation()
Enable automatic tracking of locale informationvoid
enableAutoAppendLocalTimestamp()
Enable automatic tracking of local timestamp to `time` column.void
enableAutoAppendLocalTimestamp(java.lang.String columnName)
Enable automatic tracking of local timestamp with custom column namevoid
enableAutoAppendModelInformation()
Enable automatic tracking of model informationvoid
enableAutoAppendRecordUUID()
Same asenableAutoAppendRecordUUID(String)
, using "record_uuid" as the column name.void
enableAutoAppendRecordUUID(java.lang.String columnName)
Automatically append a random and unique ID for each event.void
enableAutoAppendUniqId()
Automatically append `td_uuid` column for every events.void
enableAutoRetryUploading()
Enable automatic retry uploading.void
enableCustomEvent()
Enable custom event tracking.void
enableCustomEvent(boolean enabled)
Toggle custom event availabilitystatic void
enableEventCompression()
Event data will be compressed before uploading to server.void
enableInAppPurchaseEvent()
Enable tracking In App Purchase event automatically.void
enableInAppPurchaseEvent(boolean enabled)
Toggle tracking In App Purchase event automatically.static void
enableLogging()
Enable client logging.static void
endSession(android.content.Context context)
End tracking global sessionvoid
endSession(java.lang.String table)
Add new end session event to specified table set in the params and default database set insetDefaultDatabase(String)
void
endSession(java.lang.String database, java.lang.String table)
Add new end session eventvoid
fetchUserSegments(java.util.List<java.lang.String> profilesTokens, java.util.Map<java.lang.String,java.lang.String> keys, FetchUserSegmentsCallback callback)
TDCallback
getAddEventCallBack()
Get callback for when add event either succeed or fail if you had set one.static android.content.Context
getApplicationContext()
java.lang.Object
getDefaultValue(java.lang.String database, java.lang.String table, java.lang.String key)
Get default value of `key` in all new events targeting `database` and `table`.static java.util.concurrent.Executor
getExecutor()
int
getMaxUploadEventsAtOnce()
Get max number of records can be sent per upload events call.java.lang.String
getSessionId()
Get current session idstatic java.lang.String
getSessionId(android.content.Context context)
Get current global session idTDCallback
getUploadEventsCallBack()
Get callback for when upload events either succeed or fail if you had set one.java.lang.String
getUUID()
Get UUID generated from TreasureData.static void
initializeEncryptionKey(java.lang.String encryptionKey)
Encrypts the event data in the local persisted buffer.static TreasureData
initializeSharedInstance(android.content.Context context)
static TreasureData
initializeSharedInstance(android.content.Context context, java.lang.String apiKey)
Initialize shared instance with Treasure Data API key and default API endpointstatic TreasureData
initializeSharedInstance(android.content.Context context, java.lang.String apiKey, java.lang.String apiEndpoint)
Initialize shared instance with Treasure Data API key and API endpointboolean
isAppLifecycleEventEnabled()
Whether or not the app lifecycle tracking is enabledboolean
isCustomEventEnabled()
Whether or not the custom event tracking is enableboolean
isFirstRun(android.content.Context context)
boolean
isInAppPurchaseEventEnabled()
Whether or not the In App Purchase tracking is enabledvoid
removeDefaultValue(java.lang.String database, java.lang.String table, java.lang.String key)
Remove default value of `key` in all new events targeting `database` and `table`.static void
resetSessionId(android.content.Context context)
Reset global session id immediatelyvoid
resetUniqId()
Reset UUID and send forget_device_uuid event with old uuidvoid
setAddEventCallBack(TDCallback callBack)
Set callback for when add event either succeed or fail.void
setCDPEndpoint(java.lang.String cdpEndpoint)
This is required before callingfetchUserSegments(java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.lang.String>, com.treasuredata.android.cdp.FetchUserSegmentsCallback)
, Note that this CDP Endpoint is independent andvoid
setCDPEndpoint(java.net.URI cdpEndpoint)
This is required before callingfetchUserSegments(java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.lang.String>, com.treasuredata.android.cdp.FetchUserSegmentsCallback)
, Note that this CDP Endpoint is independent andvoid
setDefaultDatabase(java.lang.String defaultDatabase)
The destination database for events that doesn't specify one, default is "td".void
setDefaultTable(java.lang.String defaultTable)
The destination table for events that doesn't specify one.void
setDefaultValue(java.lang.String database, java.lang.String table, java.lang.String key, java.lang.Object value)
Set default `value` for `key` in all new events targeting `database` and `table`.void
setMaxUploadEventsAtOnce(int maxUploadEventsAtOnce)
Set max number of records can be sent per upload events call.static void
setSessionTimeoutMilli(long timeoutMilli)
Set the timeout in milliseconds.void
setUploadEventsCallBack(TDCallback callBack)
Set callback for when upload events either succeed or fail.static TreasureData
sharedInstance()
The default singleton SDK instance.static void
startSession(android.content.Context context)
Start tracking a global sessionvoid
startSession(java.lang.String table)
Add new start session event to specified table set in the params and default database set insetDefaultDatabase(String)
void
startSession(java.lang.String database, java.lang.String table)
Add new start session eventvoid
uploadEvents()
Upload events with callback fromsetUploadEventsCallBack(TDCallback)
void
uploadEventsWithCallback(TDCallback callback)
Upload events with callback
-
-
-
Method Detail
-
initializeSharedInstance
public static TreasureData initializeSharedInstance(android.content.Context context, java.lang.String apiKey, java.lang.String apiEndpoint)
Initialize shared instance with Treasure Data API key and API endpoint- Parameters:
apiKey
- Treasure Data API keyapiEndpoint
- Treasure Data API keycontext
- Context for Treasure Data shared instance- Returns:
sharedInstance()
-
initializeSharedInstance
public static TreasureData initializeSharedInstance(android.content.Context context, java.lang.String apiKey)
Initialize shared instance with Treasure Data API key and default API endpoint- Parameters:
apiKey
- Treasure Data API key of default API endpoint. To set API endpoint, useinitializeSharedInstance(Context, String, String)
context
- Context for Treasure Data shared instance- Returns:
sharedInstance()
-
initializeSharedInstance
public static TreasureData initializeSharedInstance(android.content.Context context)
-
sharedInstance
public static TreasureData sharedInstance()
The default singleton SDK instance.- Returns:
- the shared instance
-
getApplicationContext
public static android.content.Context getApplicationContext()
-
getExecutor
public static java.util.concurrent.Executor getExecutor()
-
getUUID
public java.lang.String getUUID()
Get UUID generated from TreasureData. The value will be set to `td_uuid` column for every events if `enableAutoAppendUniqId` is called.- Returns:
- UUID value
-
resetUniqId
public void resetUniqId()
Reset UUID and send forget_device_uuid event with old uuid
-
isFirstRun
public boolean isFirstRun(android.content.Context context)
-
clearFirstRun
public void clearFirstRun(android.content.Context context)
-
enableLogging
public static void enableLogging()
Enable client logging. Disabled by default.
-
disableLogging
public static void disableLogging()
Disable client's logging
-
initializeEncryptionKey
public static void initializeEncryptionKey(java.lang.String encryptionKey)
Encrypts the event data in the local persisted buffer. This should be called only once and prior to any `addEvent...` call.- Parameters:
encryptionKey
- encryption key to use
-
enableEventCompression
public static void enableEventCompression()
Event data will be compressed before uploading to server.
-
disableEventCompression
public static void disableEventCompression()
Event data will be uploaded in it's full format.
-
setDefaultDatabase
public void setDefaultDatabase(java.lang.String defaultDatabase)
The destination database for events that doesn't specify one, default is "td".- Parameters:
defaultDatabase
- name of the destination database
-
setDefaultTable
public void setDefaultTable(java.lang.String defaultTable)
The destination table for events that doesn't specify one. Currently this also applied for automatically tracked events (if enabled): app lifecycle, IAP and audits, default is "td_android".- Parameters:
defaultTable
- name of the destination table
-
setAddEventCallBack
public void setAddEventCallBack(TDCallback callBack)
Set callback for when add event either succeed or fail.- Parameters:
callBack
- callback to be invoked
-
getAddEventCallBack
public TDCallback getAddEventCallBack()
Get callback for when add event either succeed or fail if you had set one.- Returns:
- callback to be invoked
-
setUploadEventsCallBack
public void setUploadEventsCallBack(TDCallback callBack)
Set callback for when upload events either succeed or fail.- Parameters:
callBack
- callback to be invoked
-
getUploadEventsCallBack
public TDCallback getUploadEventsCallBack()
Get callback for when upload events either succeed or fail if you had set one.- Returns:
- callback to be invoked
-
setMaxUploadEventsAtOnce
public void setMaxUploadEventsAtOnce(int maxUploadEventsAtOnce)
Set max number of records can be sent per upload events call.- Parameters:
maxUploadEventsAtOnce
- number of maximum events
-
getMaxUploadEventsAtOnce
public int getMaxUploadEventsAtOnce()
Get max number of records can be sent per upload events call.- Returns:
- number of maximum events
-
addEvent
public void addEvent(java.lang.String database, java.lang.String table, java.util.Map<java.lang.String,java.lang.Object> record)
Track a new event- Parameters:
database
- the event's destination databasetable
- the event's destination tablerecord
- event data
-
addEventWithCallback
public void addEventWithCallback(java.lang.String database, java.lang.String table, java.util.Map<java.lang.String,java.lang.Object> origRecord, TDCallback callback)
Track a new event- Parameters:
database
- the event's destination databasetable
- the event's destination tableorigRecord
- event datacallback
- callback for when add event either succeed or fail. Default tosetAddEventCallBack(TDCallback)
-
addEvent
public void addEvent(java.lang.String table, java.util.Map<java.lang.String,java.lang.Object> record)
Track a new event to default database set bysetDefaultDatabase(String)
- Parameters:
table
- the event's destination tablerecord
- event data
-
addEventWithCallback
public void addEventWithCallback(java.lang.String table, java.util.Map<java.lang.String,java.lang.Object> record, TDCallback callback)
Track a new event to default database set bysetDefaultDatabase(String)
- Parameters:
table
- the event's destination tablerecord
- event datacallback
- callback for when add event either succeed or fail. Default tosetAddEventCallBack(TDCallback)
-
uploadEvents
public void uploadEvents()
Upload events with callback fromsetUploadEventsCallBack(TDCallback)
-
uploadEventsWithCallback
public void uploadEventsWithCallback(TDCallback callback)
Upload events with callback- Parameters:
callback
- callback to be invoked
-
appendSessionId
public void appendSessionId(java.util.Map<java.lang.String,java.lang.Object> record)
-
appendLocalTimeStamp
public void appendLocalTimeStamp(java.util.Map<java.lang.String,java.lang.Object> record)
-
appendUniqId
public void appendUniqId(java.util.Map<java.lang.String,java.lang.Object> record)
-
appendModelInformation
public void appendModelInformation(java.util.Map<java.lang.String,java.lang.Object> record)
-
appendAppInformation
public void appendAppInformation(java.util.Map<java.lang.String,java.lang.Object> record)
-
appendLocaleInformation
public void appendLocaleInformation(java.util.Map<java.lang.String,java.lang.Object> record)
-
appendRecordUUID
public void appendRecordUUID(java.util.Map<java.lang.String,java.lang.Object> record)
-
enableAppLifecycleEvent
public void enableAppLifecycleEvent()
Enable app lifecycle tracking. This setting has no effect to custom tracking
-
disableAppLifecycleEvent
public void disableAppLifecycleEvent()
Disable app lifecycle tracking. This setting has no effect to custom tracking
-
enableAppLifecycleEvent
public void enableAppLifecycleEvent(boolean enabled)
Toggle app lifecycle tracking. This setting has no effect to custom tracking- Parameters:
enabled
- true : enabled, false : disabled
-
isAppLifecycleEventEnabled
public boolean isAppLifecycleEventEnabled()
Whether or not the app lifecycle tracking is enabled- Returns:
- true : enabled, false : disabled
-
enableInAppPurchaseEvent
public void enableInAppPurchaseEvent()
Enable tracking In App Purchase event automatically. This is disabled by default.
-
disableInAppPurchaseEvent
public void disableInAppPurchaseEvent()
Enable tracking In App Purchase event automatically. This is disabled by default.
-
enableInAppPurchaseEvent
public void enableInAppPurchaseEvent(boolean enabled)
Toggle tracking In App Purchase event automatically. This is disabled by default.- Parameters:
enabled
- true : enabled, false : disabled
-
isInAppPurchaseEventEnabled
public boolean isInAppPurchaseEventEnabled()
Whether or not the In App Purchase tracking is enabled- Returns:
- true : enabled, false : disabled
-
enableCustomEvent
public void enableCustomEvent()
Enable custom event tracking.
-
disableCustomEvent
public void disableCustomEvent()
Disable custom event tracking.
-
isCustomEventEnabled
public boolean isCustomEventEnabled()
Whether or not the custom event tracking is enable- Returns:
- true : enable, false : disabled
-
enableCustomEvent
public void enableCustomEvent(boolean enabled)
Toggle custom event availability- Parameters:
enabled
- true : enabled, false : disabled
-
setCDPEndpoint
public void setCDPEndpoint(java.net.URI cdpEndpoint)
This is required before callingfetchUserSegments(java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.lang.String>, com.treasuredata.android.cdp.FetchUserSegmentsCallback)
, Note that this CDP Endpoint is independent and- Parameters:
cdpEndpoint
- Known endpoints are: AWS US https://cdp.in.treasuredata.com AWS Tokyo https://cdp-tokyo.in.treasuredata.com AWS EU https://cdp-eu01.in.treasuredata.com AWS Asia Pacific (Seoul) https://cdp-ap02.in.treasuredata.com AWS Asia Pacific (Tokyo) https://cdp-ap03.in.treasuredata.com
-
setCDPEndpoint
public void setCDPEndpoint(java.lang.String cdpEndpoint) throws java.net.URISyntaxException
This is required before callingfetchUserSegments(java.util.List<java.lang.String>, java.util.Map<java.lang.String, java.lang.String>, com.treasuredata.android.cdp.FetchUserSegmentsCallback)
, Note that this CDP Endpoint is independent and- Parameters:
cdpEndpoint
- Known endpoints are: AWS US: https://cdp.in.treasuredata.com AWS Tokyo: https://cdp-tokyo.in.treasuredata.com AWS EU: https://cdp-eu01.in.treasuredata.com AWS Asia Pacific (Seoul) https://cdp-ap02.in.treasuredata.com AWS Asia Pacific (Tokyo) https://cdp-ap03.in.treasuredata.com- Throws:
java.net.URISyntaxException
- when the provided cdpEndpoint is not a valid URI
-
fetchUserSegments
public void fetchUserSegments(java.util.List<java.lang.String> profilesTokens, java.util.Map<java.lang.String,java.lang.String> keys, FetchUserSegmentsCallback callback)
- Specified by:
fetchUserSegments
in interfaceCDPClient
- Parameters:
profilesTokens
- list of Profile API Token that are defined on TreasureDatakeys
- lookup keyColumn valuescallback
- to receive the looked-up result
-
setDefaultValue
public void setDefaultValue(java.lang.String database, java.lang.String table, java.lang.String key, java.lang.Object value)
Set default `value` for `key` in all new events targeting `database` and `table`. When `database` and/or `table` parameters are null, the null parameter acts like a wild card that allows to set specified key value pair to new events added to any database (if `database` is null) and/or to any table (if `table` is null). For example, if you pass null to both `database` and `table` parameters, all new events will have specified default value.- Parameters:
database
- the database to set default value to. If null, specified table of any database will have new events with the added default value.table
- the table to set default value to. If null, any table of specified database will have new events with the added default value.key
- the event's key that default value is set to, corresponding to column in table.value
- default value for `key`
-
getDefaultValue
public java.lang.Object getDefaultValue(java.lang.String database, java.lang.String table, java.lang.String key)
Get default value of `key` in all new events targeting `database` and `table`. See setDefaultValue() for logic setting database and table.- Parameters:
database
- the database to get default value from. If null, get default value of specified table of any database.table
- the table to get default value from. If null, get default value of any table of specified database.key
- the event's key that default value is set to, corresponding to column in table.- Returns:
- default value for `key` for events targeting `database` and `table`.
-
removeDefaultValue
public void removeDefaultValue(java.lang.String database, java.lang.String table, java.lang.String key)
Remove default value of `key` in all new events targeting `database` and `table`. See setDefaultValue() for logic setting database and table.- Parameters:
database
- the database to remove default value from. If null, specified table of any database will have new events without the default value.table
- the table to remove default value from. If null, any table of specified database will have new events without the default value.key
- the event's key that default value is set to, corresponding to column in table.
-
disableAppInstalledEvent
public void disableAppInstalledEvent()
Disable automatic tracking of event when app is installed
-
disableAppUpdatedEvent
public void disableAppUpdatedEvent()
Disable automatic tracking of event when app is updated
-
disableAppOpenEvent
public void disableAppOpenEvent()
Disable automatic tracking of event when app is opened
-
disableAutoAppendUniqId
public void disableAutoAppendUniqId()
Disable the automatically appended `td_uuid` column.
-
enableAutoAppendUniqId
public void enableAutoAppendUniqId()
Automatically append `td_uuid` column for every events. The value is randomly generated and persisted, it is shared across app launches and events. Basically, it is used to represent for a unique app installation instance. This is disabled by default.
-
disableAutoAppendModelInformation
public void disableAutoAppendModelInformation()
Disable automatic tracking of model information
-
enableAutoAppendModelInformation
public void enableAutoAppendModelInformation()
Enable automatic tracking of model information
-
disableAutoAppendAppInformation
public void disableAutoAppendAppInformation()
Disable automatic tracking of app information
-
enableAutoAppendAppInformation
public void enableAutoAppendAppInformation()
Enable automatic tracking of app information
-
disableAutoAppendLocaleInformation
public void disableAutoAppendLocaleInformation()
Disable automatic tracking of locale information
-
enableAutoAppendLocaleInformation
public void enableAutoAppendLocaleInformation()
Enable automatic tracking of locale information
-
enableAutoAppendLocalTimestamp
public void enableAutoAppendLocalTimestamp()
Enable automatic tracking of local timestamp to `time` column. This is enabled by default
-
enableAutoAppendLocalTimestamp
public void enableAutoAppendLocalTimestamp(java.lang.String columnName)
Enable automatic tracking of local timestamp with custom column name- Parameters:
columnName
- custom column name
-
disableAutoAppendLocalTimestamp
public void disableAutoAppendLocalTimestamp()
Disable automatic tracking of local timestamp
-
enableAutoAppendAdvertisingIdentifier
public void enableAutoAppendAdvertisingIdentifier()
Enable automatic tracking of advertising identifier
-
enableAutoAppendAdvertisingIdentifier
public void enableAutoAppendAdvertisingIdentifier(java.lang.String columnName)
Enable automatic tracking of advertising identifier with custom column name- Parameters:
columnName
- column name for advertising id
-
disableAutoAppendAdvertisingIdentifier
public void disableAutoAppendAdvertisingIdentifier()
Disable automatic tracking of advertising identifier
-
disableAutoRetryUploading
public void disableAutoRetryUploading()
Disable automatic retry uploading. Once disabled, app will only attempt to upload events once per upload events call.
-
enableAutoRetryUploading
public void enableAutoRetryUploading()
Enable automatic retry uploading. Once enabled, app will keep retry to upload events until events are uploaded successfully.
-
setSessionTimeoutMilli
public static void setSessionTimeoutMilli(long timeoutMilli)
Set the timeout in milliseconds. IfstartSession(Context)
is called during this timeout afterendSession(Context)
is called. App will start session with the same id as previous one.- Parameters:
timeoutMilli
- timeout duration in milliseconds
-
startSession
public void startSession(java.lang.String table)
Add new start session event to specified table set in the params and default database set insetDefaultDatabase(String)
- Parameters:
table
- table to track session events
-
startSession
public void startSession(java.lang.String database, java.lang.String table)
Add new start session event- Parameters:
database
- database to track session eventstable
- table to track session events
-
startSession
public static void startSession(android.content.Context context)
Start tracking a global session- Parameters:
context
- context of the global session
-
endSession
public void endSession(java.lang.String table)
Add new end session event to specified table set in the params and default database set insetDefaultDatabase(String)
- Parameters:
table
- table to track session events
-
endSession
public void endSession(java.lang.String database, java.lang.String table)
Add new end session event- Parameters:
database
- database to track session eventstable
- table to track session events
-
endSession
public static void endSession(android.content.Context context)
End tracking global session- Parameters:
context
- context of the global session
-
getSessionId
public java.lang.String getSessionId()
Get current session id- Returns:
- current session id
-
getSessionId
public static java.lang.String getSessionId(android.content.Context context)
Get current global session id- Returns:
- current global session id
-
resetSessionId
public static void resetSessionId(android.content.Context context)
Reset global session id immediately
-
enableAutoAppendRecordUUID
public void enableAutoAppendRecordUUID()
Same asenableAutoAppendRecordUUID(String)
, using "record_uuid" as the column name.
-
enableAutoAppendRecordUUID
public void enableAutoAppendRecordUUID(java.lang.String columnName)
Automatically append a random and unique ID for each event. Disabled by default.- Parameters:
columnName
- The column to write the ID
-
disableAutoAppendRecordUUID
public void disableAutoAppendRecordUUID()
Disable appending ID for each event.
-
-