No results found

Try a different or more specific query
Developer Console
Thank you for your visit. This page is only available in English at this time.

Android Ad Concepts

Ad Types

The Amazon Mobile Ad Network supports four ad types: static click-through banner, rich media expandable banner, modal interstitial, and modeless interstitial ads.

Static Banners - Static banners are HTML web views that typically open an in-app browser, native browser, or Android intent.

Rich Media Expandable Banners - Rich media expandable banners are HTML web views that expand in-app with rich interactive content. The call to action in these ads typically includes opening an in-app browser, native browser, or Android intent.

Interstitials - An interstitial is a full-page ad that usually appears at a transition point in the app (e.g. game level transition). The full-page ad provides advertisers with a unique opportunity to engage with the audience in a meaningful way, leading to superior monetization for developers. See details below:

  • Interstitial ads support an interactive in-app user experience.
  • These ads are loaded in the background before it's time to display them. As a result, when the time comes for the ad to appear, the ad will materialize on the screen very quickly.
  • Once an interstitial ad is shown to the user, it will reflexively scale to fill up the width and height of the screen regardless of device size or orientation.
  • Closing the ad requires user action; the user will always have the option to close the ad.
  • Interstitial ads that have loaded but have not been displayed will eventually expire. If this occurs, a new ad must be loaded before interstitials can be shown.

Modeless Interstitials - A modeless interstitial is a full screen ad view that can be embedded inside any container view that is large enough to display ad contents. It enables developers to display full screen or near full screen ads inline with app content, or ads framed with developer content. For example, a carousel of images can have content interleaved with ads, which allows users to navigate content and ads using finger gestures. Another example is a modal view on top of the developer content that has an app defined border and an app defined close button. See details below:

  • Similar to interstitial ads, modeless interstitial ads support an interactive in-app user experience.
  • A modeless interstitial ad is loaded in the background before it is time to display it. As a result, when the time comes for the ad to appear, the ad will materialize on the screen very quickly.
  • An impression is counted when a modeless interstitial ad is presented on the screen. The app must inform the SDK whenever the interstitial ad is presented on and leaves the screen.
  • Unlike interstitial ads, the same modeless interstitial can be presented multiple times without loading a new ad. While this only counts for one impression, in many scenarios this the desired behavior. For example in an image gallery a user that swipes back for an ad is expressing interest in the ad. By showing the same ad in this scenario, we’d expect a higher click through rate, which could improve conversion and developer payouts.
  • A loaded modeless interstitial ad will eventually expire. If this occurs, it is recommended that a new ad be loaded.
  • The app presents an ad modelessly by creating a container view to host the ad. This view object must meet the following rules:
    • The view must be contained in the view hierarchy of a view controller object.
    • The view size must be at least 75% of the area of the screen size.
    • The view must have at least one side that is at least 380 device independent pixels.
    • The view must be resized to match the new orientation if the view controller supports orientation changes.
    • The view must be capable of hosting subviews.
    • The view must not be obsecured by other views when presenting a modeless interstitial ad.
    • The view must be capable of being dismissed by the user. For example, the user can dismiss the view by swiping it off the screen or tapping on a close button.
  • It is recommended that the container view have a minimum aspect ratio of the device screen. Aspect ratio is calculated in terms of the view's shorter side divided by its longer side.

Ad Sizes

When setting up a banner ad, developers have the option to either manually choose an ad size or have an appropriate size chosen automatically. Once an ad of a given size is returned by the server, the ad will scale to fill its container while maintaining aspect ratio.

Auto Ad Size

The Amazon Mobile Ads API for Android can be set to automatically choose an optimally sized banner ad and scale it to fit your ad view. The size chosen is based on the screen dimensions and pixel density of the device loading the ad as well as the dimensions of the view itself. To enable Auto Ad Size, simply leave out the AdSize parameter when defining your AdLayout in either Java or XML. Here is an example of how you would set the AdLayout within Java code:

this.adView = new AdLayout(this);

Here is an example of how you would set the AdLayout within an XML layout file:


Learn more about creating AdLayouts in the Quick Start Guide.

Auto Ad Size Guidelines

  • Auto Ad Size is designed for screen-wide banner ads. We recommend setting your AdLayout’s width to MATCH_PARENT and placing it within a layout whose width equals the screen’s width.
  • We recommend setting the AdLayout’s height to WRAP_CONTENT to ensure that the ad will scale to fill the entire AdLayout. Alternatively, you can limit the ad’s height by setting it to a device-independent pixel value or by disabling upscaling instead. See the next section for more information about disabling upscaling for Auto Ad Size.
  • On tablet-sized devices, banner ads of sizes 600x90, 728x90, or 1024x50 will be selected. On smaller devices, including most phones, banner ads of size 320x50 will be selected. If the chosen ad is smaller than its AdLayout then it will be upscaled to span one of the dimensions unless upscaling has been disabled as described in the next section.
  • On phone-sized devices, your AdLayout must be at least 320dp wide and 50dp high.
  • On tablet-sized devices, your AdLayout must be at least 533dp wide and 79dp high, or at least 1024dp wide and 50dp high.
  • Auto Ad Size is not applicable for interstitial ads.

Auto Ad Size with No Upscaling

Setting the AdLayout's layout params to MATCH_PARENT x WRAP_CONTENT, as recommended above, will normally cause the returned ad to scale up and fill as much space as necessary to maintain the ad's aspect ratio while matching the AdLayout's parent width.

Since the parent width is often the same as the screen width, in some cases (such as when loading an ad in landscape orientation on a small device) it may be more desirable to display the returned ad at its original device-independent pixel size in order to prevent the ad from taking up too much screen real estate. This can be achieved by choosing the Auto No Scale size when declaring your AdLayout. Note that all of the guidelines for Auto Ad Size described above still apply when choosing this option.

This is the recommended option when creating floating ad banners. You should make the AdLayout as large as possible with width MATCH_PARENT and height WRAP_CONTENT. The returned ad will only take up the actual dip of the ad. Unlike standard Auto Ad Size, Auto No Scale must be set manually when creating the AdLayout. This can be done programmatically by including the AdSize.SIZE_AUTO_NO_SCALE parameter in the AdLayout constructor or through XML by setting "AutoNoScale" for the Amazon:adSize field. See the next section for instructions on manually setting the ad size.

Manual Ad Size

If you want to set the Android banner ad size yourself for Android apps, you can specify a size in either the AdLayout constructor or through XML. Manually setting the size is recommended for ads that do not span the entire screen width and it's required for 300x250 ads. The Amazon Mobile Ad Network supports ad sizes of 320x50, and 300x250 for phones and 600x90, 728x90, 1024x50, and 300x250 for tablets. Your app should request a device-appropriate size, which will be scaled to your ad view. Ad sizes are specified in the AdLayout constructor or the XML layout file. Here is an example of how you would set the AdLayout within Java code:

this.adView = new AdLayout(this, AdSize.SIZE_320x50);

For setting the size through the Java code as in the above example, you must provide the AdLayout constructor with one of the following AdSize class fields:

  • AdSize.SIZE_320x50
  • AdSize.SIZE_300x250
  • AdSize.SIZE_600x90
  • AdSize.SIZE_728x90
  • AdSize.SIZE_1024x50

Alternatively, you can also specify the size within an XML AdLayout initialization as follows:


See the following chart for recommended sizes by device:

Ad Size Android Phone Android Tablet Fire Tablet
320x50 Yes No No
300x250 Yes Yes Yes
600x90 No Yes Yes
728x90 No Yes No
1024x50 No Yes Yes

Above the Fold

All ad placements must be above the fold, which means fully visible without scrolling. If an ad placement is embedded with content in a screen, it can scroll with that content and scroll off of the screen as long as it started above the fold.

Ad Reload Rate

The Amazon Mobile Ad Network recommends loading a new ad on screen navigations and device orientation changes when the ad view changes size. You may also want to refresh the ad after a set time interval. In this case, the Amazon Mobile Ad Network recommends a refresh rate of 30 to 60 seconds. Faster ad refresh intervals could result in blocked ad requests. Please note that the Amazon Mobile Ads API does not provide any built-in functionality for automatically refreshing ads.