Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
    
    
  
  
    
    
    
    SignedContextualAds
    class SignedContextualAds : Parcelable
    
    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: 
     
      - Objectsconcatenate the serialized values of their fields with the- |(pipe) in between each field
- All fieldsare sorted by alphabetical order within the object
- Nullable fieldsare skipped if they are null/unset
- Doublesare converted to String preserving precision
- Integersare converted to string values
- Setsare sorted alphabetically
- Listskeep the same order
- Stringsget encoded into byte[] using UTF-8 encoding
Summary
    
    
      
        
          | Inherited constants | 
        
          | From class Parcelable
                
                  
                    | Int | CONTENTS_FILE_DESCRIPTOR
                         Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor. |  
                    | Int | PARCELABLE_WRITE_RETURN_VALUE
                         Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point. |  | 
      
    
    
    
    Public methods
    
      describeContents
      
      fun describeContents(): Int
      
     
    
      equals
      
      fun equals(other: Any?): Boolean
      
        
          
            | Parameters | 
          
            | obj | the reference object with which to compare. | 
        
      
      
        
          
            | Return | 
          
            | Boolean | trueif this object is the same as the obj argument;falseotherwise. | 
        
      
     
    
    
      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
      
        
          
            | Return | 
          
            | Int | a hash code value for this object. | 
        
      
     
    
      toString
      
      fun toString(): String
      
        
          
            | Return | 
          
            | String | a string representation of the object. | 
        
      
     
    
      writeToParcel
      
      fun writeToParcel(
    dest: Parcel, 
    flags: Int
): Unit
      Flatten this object in to a Parcel.
      
     
    Properties
    
  
  
  
    
  
 
  
    
      
      
    
    
      
    
    
  
       
    
    
      
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2025-02-10 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]