public interface

AppLovinNativeAd

com.applovin.nativeAds.AppLovinNativeAd

Class Overview

Defines an in-content ad which should be rendered by you into a custom view that matches the look and feel of your application.

Summary

Public Methods
abstract long getAdId()
Retrieve a unique identifier for this ad, which can be provided to AppLovin should you see issues with this particular ad.
abstract String getCaptionText()
Retrieve the caption of the application being advertised.
abstract String getClickUrl()
This method is deprecated. Use launchClickTarget() rather than opening this URL yourself.
abstract String getCtaText()
Retrieve the call-to-action / button text of the application being advertised.
abstract String getDescriptionText()
Retrieve the description of the application being advertised.
abstract String getIconUrl()
Retrieve the URL of an image containing the launcher icon of the application being advertised
abstract String getImageUrl()
Retrieve the URL of an image containing a promotional image or screenshot of the application being advertised.
abstract String getImpressionTrackingUrl()
This method is deprecated. Use trackImpression() or trackImpression(AppLovinPostbackListener postbackListener) rather than firing this Url yourself.
abstract float getStarRating()
Retrieve the URL of an image containing the current Google Play star rating of the application being advertised.
abstract String getTitle()
Retrieve the title of the application being advertised.
abstract String getVideoEndTrackingUrl(int percentViewed, boolean firstPlay)
Retrieve the URL which should be fired upon video completion.
abstract String getVideoStartTrackingUrl()
Retrieve the URL which should be fired upon video start.
abstract String getVideoUrl()
Retrieve the URL of a promotional video, if this ad contains a video.
abstract boolean isImagePrecached()
Check whether or not all image assets for this ad have been precached.
abstract boolean isVideoPrecached()
Check whether or not this ad's video have been precached.
abstract void launchClickTarget(Context context)
Handle a click on this native ad by launching the ad's destination.
abstract void trackImpression(AppLovinPostbackListener postbackListener)
Fires the impression asynchronously and notifies the provided delegate.
abstract void trackImpression()
Fires the impression asynchronously.

Public Methods

public abstract long getAdId ()

Retrieve a unique identifier for this ad, which can be provided to AppLovin should you see issues with this particular ad.

public abstract String getCaptionText ()

Retrieve the caption of the application being advertised. May be null.

public abstract String getClickUrl ()

This method is deprecated.
Use launchClickTarget() rather than opening this URL yourself.

Retrieve the URL which should be fired upon ad click.

public abstract String getCtaText ()

Retrieve the call-to-action / button text of the application being advertised. May be null.

public abstract String getDescriptionText ()

Retrieve the description of the application being advertised.

public abstract String getIconUrl ()

Retrieve the URL of an image containing the launcher icon of the application being advertised

public abstract String getImageUrl ()

Retrieve the URL of an image containing a promotional image or screenshot of the application being advertised.

public abstract String getImpressionTrackingUrl ()

This method is deprecated.
Use trackImpression() or trackImpression(AppLovinPostbackListener postbackListener) rather than firing this Url yourself.

Retrieve the URL which should be fired upon ad impression.

public abstract float getStarRating ()

Retrieve the URL of an image containing the current Google Play star rating of the application being advertised.

public abstract String getTitle ()

Retrieve the title of the application being advertised.

public abstract String getVideoEndTrackingUrl (int percentViewed, boolean firstPlay)

Retrieve the URL which should be fired upon video completion.

Parameters
percentViewed The percentage of the video (0 - 100) that was viewed by the user.
firstPlay Whether or not this postback represents initial playback of the video. The first time you begin playback, you should pass true. If the video is paused for any reason and then later resumed mid-playback, you should fire this postback a second time, passing false to firstPlay.

public abstract String getVideoStartTrackingUrl ()

Retrieve the URL which should be fired upon video start.

public abstract String getVideoUrl ()

Retrieve the URL of a promotional video, if this ad contains a video.

Not all native advertisements will contain a video. Therefore, may be null.

public abstract boolean isImagePrecached ()

Check whether or not all image assets for this ad have been precached.

Returns
  • True if image resources have been pre-cached. In this case, resource URLs retrieved from this instance will point to the local filesystem. False if image resources have not been pre-cached. In this case, resource URLs will point to HTTP or HTTPS resources on the web.

public abstract boolean isVideoPrecached ()

Check whether or not this ad's video have been precached.

Returns
  • True if this ad has a video resource, and it has been pre-cached. In this case, getVideoUrl will point to the local filesystem for this instance. False if video resources have not been pre-cached. In this case, getVideoUrl will point to an HTTP or HTTPS resource on the web.

public abstract void launchClickTarget (Context context)

Handle a click on this native ad by launching the ad's destination.

You should call this method anytime the user taps anywhere on your native ad. Calling this method launches Chrome or the Google Play Store and will result in your app being paused.

public abstract void trackImpression (AppLovinPostbackListener postbackListener)

Fires the impression asynchronously and notifies the provided delegate.

public abstract void trackImpression ()

Fires the impression asynchronously.