EventLogRecord.Builder
public
static
final
class
EventLogRecord.Builder
extends Object
| java.lang.Object | |
| ↳ | android.adservices.ondevicepersonalization.EventLogRecord.Builder |
This class is deprecated.
The ODP APIs are deprecated and will not be supported in future Android
releases. There is no direct replacement API available. Developers currently integrated with
these APIs must cease further integration efforts. For comprehensive details regarding this
deprecation and the future roadmap of Privacy Sandbox on Android, please consult the
official Privacy Sandbox developer documentation and announcements:
https://privacysandbox.google.com
A builder for EventLogRecord
Summary
Public constructors | |
|---|---|
Builder()
|
|
Public methods | |
|---|---|
EventLogRecord
|
build()
Builds the instance. |
EventLogRecord.Builder
|
setData(ContentValues value)
Additional data to be logged. |
EventLogRecord.Builder
|
setRequestLogRecord(RequestLogRecord value)
The existing |
EventLogRecord.Builder
|
setRowIndex(int value)
The index of the row in an existing |
EventLogRecord.Builder
|
setType(int value)
The service-assigned identifier that identifies this payload. |
Inherited methods | |
|---|---|
Public constructors
Public methods
build
public EventLogRecord build ()
Builds the instance. This builder should not be touched after calling this!
| Returns | |
|---|---|
EventLogRecord |
This value cannot be null. |
setData
public EventLogRecord.Builder setData (ContentValues value)
Additional data to be logged. Can be null if no additional data needs to be written as part of the event, and only the occurrence of the event needs to be logged.
| Parameters | |
|---|---|
value |
ContentValues: This value may be null. |
| Returns | |
|---|---|
EventLogRecord.Builder |
|
setRequestLogRecord
public EventLogRecord.Builder setRequestLogRecord (RequestLogRecord value)
The existing RequestLogRecord that this payload should be associated with. In an
implementation of
IsolatedWorker.onExecute(ExecuteInput,android.os.OutcomeReceiver), this should be
set to a value returned by LogReader.getRequests(Instant,Instant). In an
implementation of IsolatedWorker.onEvent(EventInput,android.os.OutcomeReceiver),
this should be set to null because the payload will be automatically associated with
the current RequestLogRecord.
| Parameters | |
|---|---|
value |
RequestLogRecord: This value may be null. |
| Returns | |
|---|---|
EventLogRecord.Builder |
|
setRowIndex
public EventLogRecord.Builder setRowIndex (int value)
The index of the row in an existing RequestLogRecord that this payload should be
associated with.
| Parameters | |
|---|---|
value |
int: Value is 0 or greater |
| Returns | |
|---|---|
EventLogRecord.Builder |
This value cannot be null. |
setType
public EventLogRecord.Builder setType (int value)
The service-assigned identifier that identifies this payload. Each row in
RequestLogRecord can be associated with up to one event of a specified type.
The platform drops events if another event with the same type already exists for a row
in RequestLogRecord. Must be >0 and <128. This allows up to 127 events to be
written for each row in RequestLogRecord. If unspecified, the default is 1.
| Parameters | |
|---|---|
value |
int: Value is between 1 and 127 inclusive |
| Returns | |
|---|---|
EventLogRecord.Builder |
This value cannot be null. |