TakenAction
@Document(name = "builtin:TakenAction")
@ExperimentalAppSearchApi
abstract class TakenAction
ClickAction |
|
DismissAction |
|
ImpressionAction |
|
SearchAction |
|
TakenAction is an abstract class which holds common fields of other AppSearch built-in action types (e.g. SearchAction, ClickAction).
Clients can report the user's actions by creating concrete actions with addTakenActions API.
Summary
Public functions |
|
|---|---|
Long |
Returns the timestamp when the user took the action, in milliseconds since Unix epoch. |
Long |
Returns the time-to-live (TTL) of the |
String |
getId()Returns the unique identifier of the |
String |
Returns the namespace of the |
Public functions
getActionTimestampMillis
fun getActionTimestampMillis(): Long
Returns the timestamp when the user took the action, in milliseconds since Unix epoch.
The action timestamp will be used together with getDocumentTtlMillis as the document retention.
getDocumentTtlMillis
fun getDocumentTtlMillis(): Long
Returns the time-to-live (TTL) of the TakenAction document as a duration in milliseconds.
The document will be automatically deleted when the TTL expires (since getActionTimestampMillis).
The default TTL for TakenAction document is 60 days.
See androidx.appsearch.annotation.Document.TtlMillis for more information on TTL.