NativeMediationAdRequest

interface NativeMediationAdRequest : MediationAdRequest


Information about the native ad to fetch for a single publisher. The information is passed through to the ad network's native ad adapter.

Summary

Public functions

Float

Returns ad volume as a fraction of system volume.

NativeAdOptions

This function is deprecated. Use getNativeAdRequestOptions() instead.

NativeAdOptions

Returns the com.google.android.gms.ads.nativead.NativeAdOptions provided with the native ad request.

Boolean

Returns whether ad is muted.

Boolean

Returns whether a native ad is requested or not.

Inherited functions

From com.google.android.gms.ads.mediation.MediationAdRequest
Date?

This function is deprecated. This method is deprecated.

Int

This function is deprecated. This method is deprecated.

Set<String>?

Returns the set of keywords requested by the user, if defined by the ad request.

Location?

Returns the location of the user, if defined by the ad request.

String?

Returns the maximum ad content rating for this request.

Boolean

This function is deprecated. This method is deprecated.

Boolean

Returns true if the publisher is asking for test ads.

Int

Returns whether the publisher indicated that the app is to be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) - http://business.ftc.gov/privacy-and-security/childrens-privacy.

Int

Returns whether the publisher indicated that the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent, if defined by the ad request.

Public functions

getAdVolume

fun getAdVolume(): Float

Returns ad volume as a fraction of system volume. Value will be between 0 and 1 inclusive.

getNativeAdOptions

fun getNativeAdOptions(): NativeAdOptions

Returns the NativeAdOptions provided with the native ad request. It returns null if NativeAdOptions are not provided.

getNativeAdRequestOptions

fun getNativeAdRequestOptions(): NativeAdOptions

Returns the com.google.android.gms.ads.nativead.NativeAdOptions provided with the native ad request.

isAdMuted

fun isAdMuted(): Boolean

Returns whether ad is muted.

isUnifiedNativeAdRequested

fun isUnifiedNativeAdRequested(): Boolean

Returns whether a native ad is requested or not.