Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 8](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#nestedclasses) \| [Constants](https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#constants) \| [Methods](https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#inhmethods)

# ReportEventRequest

*** ** * ** ***


`
public


class
ReportEventRequest
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.adservices.adselection.ReportEventRequest |

<br />

*** ** * ** ***


**This class was deprecated
in API level 37.**   

The Rubidium (Rb) Relevance APIs, including those in android.adservices.adselection,
are being deprecated. Relevance APIs have no direct replacement. Developers should stop using
them, as calls will be rejected in future Android releases. Please refer to official Privacy
Sandbox documentation for deprecation and roadmap details:
https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/

Request object wrapping the required arguments needed to report an ad event.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest.Builder` *This class was deprecated in API level 37. The Rubidium (Rb) Relevance APIs, including those in android.adservices.adselection, are being deprecated. Relevance APIs have no direct replacement. Developers should stop using them, as calls will be rejected in future Android releases. Please refer to official Privacy Sandbox documentation for deprecation and roadmap details: https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/* |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_BUYER` This is used to represent buyer as the destination for report event API. |
| `int` | `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_COMPONENT_SELLER` This is used to component seller as the destination for report event API |
| `int` | `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_SELLER` This is used to represent seller as the destination for report event API |

| ### Public methods ||
|---|---|
| ` long` | ` https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#getAdSelectionId()() ` Returns the adSelectionId, the primary identifier of an ad selection process. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#getData()() ` Returns the ad event data. |
| ` https://developer.android.com/reference/android/view/InputEvent` | ` https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#getInputEvent()() ` Returns the input event associated with the user interaction. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#getKey()() ` Returns the event key, the type of ad event to be reported. |
| ` int` | ` https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#getReportingDestinations()() ` Returns the bitfield of reporting destinations to report to (buyer, seller, component seller or any of the combination of them). |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### FLAG_REPORTING_DESTINATION_BUYER

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 8](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_REPORTING_DESTINATION_BUYER
```

This is used to represent buyer as the destination for report event API.

<br />

Constant Value:

2
(0x00000002)


### FLAG_REPORTING_DESTINATION_COMPONENT_SELLER

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 18](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_REPORTING_DESTINATION_COMPONENT_SELLER
```

This is used to component seller as the destination for report event API

<br />

Constant Value:

4
(0x00000004)


### FLAG_REPORTING_DESTINATION_SELLER

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 8](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_REPORTING_DESTINATION_SELLER
```

This is used to represent seller as the destination for report event API

<br />

Constant Value:

1
(0x00000001)


## Public methods

### getAdSelectionId

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 8](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getAdSelectionId ()
```

Returns the adSelectionId, the primary identifier of an ad selection process.

<br />

| Returns ||
|---|---|
| `long` | <br /> |

### getData

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 8](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getData ()
```

Returns the ad event data.

After ad selection, this data is generated by the caller. The caller can then call `https://developer.android.com/reference/android/adservices/adselection/AdSelectionManager#reportEvent(android.adservices.adselection.ReportEventRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Object,java.lang.Exception>)`. This data will be attached in a POST request to the `reportingUri` registered in `registerAdBeacon`.

The size of `https://developer.android.com/reference/java/lang/String#getBytes()` in `UTF-8` format should be below 64KB.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value cannot be `null`. <br /> |

### getInputEvent

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputEvent getInputEvent ()
```

Returns the input event associated with the user interaction.

This field is either `null`, representing a *view* event, or has an `https://developer.android.com/reference/android/view/InputEvent` object, representing a *click* event.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/InputEvent` | <br /> |

### getKey

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 8](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getKey ()
```

Returns the event key, the type of ad event to be reported.

This field will be used to fetch the `reportingUri` associated with the `eventKey` registered in `registerAdBeacon` after ad selection.

This field should be an exact match to the `eventKey` registered in `registerAdBeacon`. Specific details about `registerAdBeacon` can be found at the
documentation of `https://developer.android.com/reference/android/adservices/adselection/AdSelectionManager#reportImpression(android.adservices.adselection.ReportImpressionRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Object,java.lang.Exception>)`

The event key (when inspecting its byte array with `https://developer.android.com/reference/java/lang/String#getBytes()`) in `UTF-8` format should not exceed 40 bytes. Any key exceeding this limit will not be registered
during the `registerAdBeacon` call.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value cannot be `null`. <br /> |

### getReportingDestinations

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 8](https://developer.android.com/sdkExtensions)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getReportingDestinations ()
```

Returns the bitfield of reporting destinations to report to (buyer, seller, component seller
or any of the combination of them).

To create this bitfield, place an `|` bitwise operator between each `reportingDestination` to be reported to. For example to only report to buyer, set the
reportingDestinations field to `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_BUYER` To only report to
seller, set the reportingDestinations field to `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_SELLER` To
report to buyers and sellers, set the reportingDestinations field to `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_BUYER` \| `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_SELLER`. To report to
buyer, seller and component seller, set the reportingDestinations field to `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_BUYER` \| `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_SELLER` \| `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_COMPONENT_SELLER`.

<br />

| Returns ||
|---|---|
| `int` | Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_SELLER` - `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_BUYER` - `https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_COMPONENT_SELLER` |