public abstract class

NativeContentAdMapper

extends NativeAdMapper
java.lang.Object
   ↳ com.google.android.gms.ads.mediation.NativeAdMapper
     ↳ com.google.android.gms.ads.mediation.NativeContentAdMapper

Class Overview

Mapping class for AdMob native content ads.

Mediation adapters that load a native content ad must extend this class to provide a mapping from the mediated ad network's native ad object to NativeContentAd.

Summary

[Expand]
Inherited Fields
From class com.google.android.gms.ads.mediation.NativeAdMapper
Public Constructors
NativeContentAdMapper()
Public Methods
final String getAdvertiser()
Returns the text that identifies the advertiser.
final String getBody()
Returns the secondary text.
final String getCallToAction()
Returns the text that encourages the user to take some action with the ad.
final String getHeadline()
Returns the primary text headline.
final List<NativeAd.Image> getImages()
Returns a list of images.
final NativeAd.Image getLogo()
Returns a small image identifying the advertiser.
final void setAdvertiser(String advertiser)
Sets a text that identifies the advertiser.
final void setBody(String body)
Sets the secondary text.
final void setCallToAction(String callToAction)
Sets the text that encourages the user to take some action with the ad.
final void setHeadline(String headline)
Sets the primary text headline.
final void setImages(List<NativeAd.Image> images)
Sets a list of images.
final void setLogo(NativeAd.Image logo)
Sets a small image identifying the advertiser.
[Expand]
Inherited Methods
From class com.google.android.gms.ads.mediation.NativeAdMapper
From class java.lang.Object

Public Constructors

public NativeContentAdMapper ()

Public Methods

public final String getAdvertiser ()

Returns the text that identifies the advertiser.

Returns
String

public final String getBody ()

Returns the secondary text.

Returns
String

public final String getCallToAction ()

Returns the text that encourages the user to take some action with the ad.

Returns
String

public final String getHeadline ()

Returns the primary text headline.

Returns
String

public final List<NativeAd.Image> getImages ()

Returns a list of images.

Returns
List<NativeAd.Image>

public final NativeAd.Image getLogo ()

Returns a small image identifying the advertiser.

Returns
NativeAd.Image

public final void setAdvertiser (String advertiser)

Sets a text that identifies the advertiser. This is a recommended field.

Parameters
advertiser String: The text to set

public final void setBody (String body)

Sets the secondary text. This is a required field.

Parameters
body String: The secondary text to set

public final void setCallToAction (String callToAction)

Sets the text that encourages the user to take some action with the ad. This is a recommended field.

Parameters
callToAction String: The text to set

public final void setHeadline (String headline)

Sets the primary text headline. This is a required field.

Parameters
headline String: The primary text headline to set

public final void setImages (List<NativeAd.Image> images)

Sets a list of images. This is a recommended field.

Parameters
images List: The list of images to set

public final void setLogo (NativeAd.Image logo)

Sets a small image identifying the advertiser. This is a recommended field.

Parameters
logo NativeAd.Image: The image to set