App open ads are used to display ads when users enter your app. An AppOpenAd
object contains all the data necessary to display an ad in an AppOpenAdView
object. Unlike interstitial ads, app open ads make it easy to provide an app branding area so
that users understand the context in which they see the ad. Use one of the static
load
methods to load an AppOpenAd
. Then, set the ad on an
AppOpenAdView
to render it.
Nested Class Summary
class | AppOpenAd.AppOpenAdLoadCallback | An object for receiving event notifications for loading an app open ad. | |
@interface | AppOpenAd.AppOpenAdOrientation | App open ad orientation. |
Constant Summary
int | APP_OPEN_AD_ORIENTATION_LANDSCAPE | Landscape orientation. |
int | APP_OPEN_AD_ORIENTATION_PORTRAIT | Portrait orientation. |
Public Constructor Summary
Public Method Summary
static void | |
static void |
load(Context
context, String adUnitId,
PublisherAdRequest publisherAdRequest, int orientation,
AppOpenAd.AppOpenAdLoadCallback loadCallback)
Load an
AppOpenAd .
|
Inherited Method Summary
Constants
public static final int APP_OPEN_AD_ORIENTATION_LANDSCAPE
Landscape orientation.
public static final int APP_OPEN_AD_ORIENTATION_PORTRAIT
Portrait orientation.
Public Constructors
public AppOpenAd ()
Public Methods
public static void load (Context context, String adUnitId, AdRequest adRequest, int orientation, AppOpenAd.AppOpenAdLoadCallback loadCallback)
Load an AppOpenAd
.
Parameters
context | The context. |
---|---|
adUnitId | The ad unit ID. |
adRequest | An ad request with targeting information. |
orientation | The orientation that the ad will be presented in. |
loadCallback | An object that handles events for loading an app open ad. |
public static void load (Context context, String adUnitId, PublisherAdRequest publisherAdRequest, int orientation, AppOpenAd.AppOpenAdLoadCallback loadCallback)
Load an AppOpenAd
.
Parameters
context | The context. |
---|---|
adUnitId | The ad unit ID. |
publisherAdRequest | An ad request with targeting information. |
orientation | The orientation that the ad will be presented in. |
loadCallback | An object that handles events for loading an app open ad. |