Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Follow the instructions in this section to set up our SDK to show ads in your app.

Table of Contents
none
minLevel1
maxLevel6
outlinefalse
styledefault
typelist
printablefalse

Requirements

This SDK requires Android 4 or later, and Android SDK version 14 or higher.In order to show ads, you must have a valid Xandr placement ID. This is a numeric ID that represents a context in an application where ads can be shown

Info

Tip: Google Play

In order to enable the Android Advertising ID (AAID) for frequency capping and mobile app targeting, you must include Google Play Services as a dependency of your app. XandrE-Planning's SDK will still function without Google Play Services, but you won't have access to those features.

...

  • opensdk:publisher_id or adview.setPublisherId(Int publisherID): The publisherID ID associated with your app's inventory. You must include a publisher ID or an error will be thrown. Example: 123456. You can get this value from your Account Manager.

  • opensdk:placement_id is an internal value that will be used to identify the placement in your app. Please use any name that will help you to identify the placementnote that two different placements cannot use the same identifier.

  • opensdk:auto_refresh_interval or adview.setAutoRefreshInterval(long interval): The interval, in milliseconds, at which the ad view will request new ads, if autorefresh is enabled. The minimum period is 15 seconds. The default period is 30 seconds. Set this to 0 to disable autorefresh. Example: "60000".

  • opensdk:ad_width or adview.setAdSize(int width, int height): The width of the advertisement to request from the server. If this is not set, the SDK requests an ad of at least android:layout_width. Note that the Java method setAdSize sets the width and height at the same time. Example: "320".

  • opensdk:ad_height or adview.setAdSize(int width, int height): The height of the view. Note that the Java method setAdSize sets the width and height at the same time. Example: "50dp".

...

  1. Call InterstitialAdView.loadAd() to fetch the ad contents from our server and cache them locally. Note that any ad content is rendered in a WebView at the time it is fetched from the ad server and cached. This means that any third-party tracking pixels that are part of the ad content will be fired at the time of the call to loadAd(), not when the call to show() is made at a later time.

  2. When you're ready to show the interstitial ad to the user, call show(). This needs to happen within approximately 4 minutes of the call to loadAd() in order for the impression to be counted by XandrE-Planning. (For the exact timing in milliseconds, see the value of InterstitialAdView.MAX_AGE in the source code.)

...