SignedContextualAds
class SignedContextualAds : Parcelable
kotlin.Any | |
↳ | android.adservices.adselection.SignedContextualAds |
Contains a list of buyer supplied AdWithBid
bundle and its signature.
Instances of this class are created by SDKs to be injected as part of AdSelectionConfig
and passed to android.adservices.adselection.AdSelectionManager#selectAds
SignedContextualAds are signed using ECDSA algorithm with SHA256 hashing algorithm (aka SHA256withECDSA). Keys used should belong to P-256 curve (aka “secp256r1” or “prime256v1”).
Signature should include the buyer, decisionLogicUri and adsWithBid fields.
While creating the signature a specific serialization rules must be followed as it's outlined here:
Objects
concatenate the serialized values of their fields with the|
(pipe) in between each fieldAll fields
are sorted by alphabetical order within the objectNullable fields
are skipped if they are null/unsetDoubles
are converted to String preserving precisionIntegers
are converted to string valuesSets
are sorted alphabeticallyLists
keep the same orderStrings
get encoded into byte[] using UTF-8 encoding
Summary
Nested classes | |
---|---|
Builder for |
Inherited constants | |
---|---|
Public methods | |
---|---|
Int | |
Boolean | |
MutableList<AdWithBid!> | |
AdTechIdentifier |
getBuyer() |
Uri | |
ByteArray |
Returns a copy of the signature for the contextual ads object. |
Int |
hashCode() |
String |
toString() |
Unit |
writeToParcel(dest: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties | |
---|---|
static Parcelable.Creator<SignedContextualAds!> |
Public methods
describeContents
fun describeContents(): Int
getAdsWithBid
fun getAdsWithBid(): MutableList<AdWithBid!>
Return | |
---|---|
MutableList<AdWithBid!> |
the Ad data with bid value associated with this ad This value cannot be null . |
getBuyer
fun getBuyer(): AdTechIdentifier
Return | |
---|---|
AdTechIdentifier |
the Ad tech identifier from which this contextual Ad would have been downloaded This value cannot be null . |
getDecisionLogicUri
fun getDecisionLogicUri(): Uri
Return | |
---|---|
Uri |
the URI used to retrieve the updateBid() and reportWin() function used during the ad selection and reporting process This value cannot be null . |
getSignature
fun getSignature(): ByteArray
Returns a copy of the signature for the contextual ads object.
See SignedContextualAds
for more details.
Return | |
---|---|
ByteArray |
the signature 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 |
Properties
CREATOR
static val CREATOR: Parcelable.Creator<SignedContextualAds!>