Skip to end of metadata
Go to start of metadata

Allow Multiple Ad Sizes to Serve into a Banner Ad View

Banner ads with a fixed size may not get as much demand as you'd like. To open up a banner ad view to more demand, and hopefully more revenue, you can allow more than one ad size to serve.

Follow the instructions below to allow multiple ad sizes to serve into your banner ad views.

On This Page

iOS

To allow multiple ad sizes to serve into a banner ad view on iOS, use the setAdSizesmethod:

As shown in the example below, the sizes array needs to be an NSArray of NSValue objects wrapping CGSize structs, as described in the NSValue documentation:

Android

To allow multiple ad sizes to serve into a banner ad view on Android, use the following methods on BannerAdView:

  • setAdSizes(ArrayList<AdSize> adSizes): Takes a list of the platform ad sizes that may be inserted into the current banner ad view.
  • getAdSizes(): Returns the sizes allowed to be displayed in the current banner ad view.

Example:

Related Topics