Class AdRequest


  • public final class AdRequest
    extends java.lang.Object
    An AdRequest contains targeting information used to fetch an ad. Ad requests are created using AdRequest.Builder.
    • Method Detail

      • getAge

        @Nullable
        public java.lang.String getAge()
        Returns current user age entered inside the app that was set into AdRequest.Builder.
        Returns:
        User's age
      • getGender

        @Nullable
        public java.lang.String getGender()
        Returns user gender entered inside the app that was set into AdRequest.Builder.
        Returns:
        User's gender
      • getContextQuery

        @Nullable
        public java.lang.String getContextQuery()
        Returns current user query entered inside the app that was set into AdRequest.Builder.
        Returns:
        Context query
      • getContextTags

        @Nullable
        public java.util.List<java.lang.String> getContextTags()
        Returns tags describing current user context inside the app that were set into AdRequest.Builder.
        Returns:
        Context tags
      • getLocation

        @Nullable
        public android.location.Location getLocation()
        Returns the user's mLocation for targeting process that was set into AdRequest.Builder.
        Returns:
        User's mLocation
      • getParameters

        @Nullable
        public java.util.Map<java.lang.String,​java.lang.String> getParameters()
        Returns custom mParameters that were set into AdRequest.Builder.
        Returns:
        Custom mParameters
      • getBiddingData

        @Nullable
        public java.lang.String getBiddingData()
        Returns bid id that were set into AdRequest.Builder.
        Returns:
        Bid id
      • getPreferredTheme

        @Nullable
        public com.yandex.mobile.ads.common.AdTheme getPreferredTheme()
        Returns preferred theme which was set into AdRequest.Builder.
        Returns:
        Preferred theme
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object