ComponentAdData
class ComponentAdData : Parcelable
kotlin.Any | |
↳ | android.adservices.common.ComponentAdData |
Represents data specific to a component ad that is necessary for ad selection and rendering. This is to support use case for ads composed of multiple pieces, such as an ad displaying multiple products at once.
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
ComponentAdData(renderUri: Uri, adRenderId: String) Constructs a |
Public methods | |
---|---|
Int | |
Boolean | |
String |
Gets the component ad render id for server auctions. |
Uri |
Gets the URI that points to the component's rendering resources. |
Int |
hashCode() |
String |
toString() |
Unit |
writeToParcel(dest: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties | |
---|---|
static Parcelable.Creator<ComponentAdData!> |
Public constructors
ComponentAdData
ComponentAdData(
renderUri: Uri,
adRenderId: String)
Constructs a ComponentAdData
object.
This object represents a single component within a multi-part ad. The provided render URI points to the resources needed to render this component. Both the URI and the resources to render the component are provided by the buyer ad tech.
Parameters | |
---|---|
renderUri |
Uri: the URI that points to the component's rendering resources. This value cannot be null . |
adRenderId |
String: the component ad render ID used in the auction flow to identify the ad and bid on it. This ID is typically generated by the buyer ad tech and is also used to track the individual component within the larger ad. This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the provided adRenderId is empty. |
Public methods
describeContents
fun describeContents(): Int
getAdRenderId
fun getAdRenderId(): String
Gets the component ad render id for server auctions.
Ad render id is collected for each ComponentAdData
when server auction request is received.
The overall size of the Custom Audience is limited. The size of this field is considered using String.getBytes()
in UTF-8
encoding.
Return | |
---|---|
String |
This value cannot be null . |
getRenderUri
fun getRenderUri(): Uri
Gets the URI that points to the component's rendering resources.
Both the URI and the resources it points to are provided by the buyer ad tech.
Return | |
---|---|
Uri |
This value cannot be null . |
hashCode
fun hashCode(): Int
toString
fun toString(): String
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
Parcel: This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |