Overriding the Ad Tag URL on Android
Was this article helpful?
If you need a value for your base Google IMA ad tag URL that is different than the value defined in Backlot, use the adUrlOverride() method, as shown in the following example. Consider:
- You must override before you set the video identifier with setEmbedCode.
- The example below does not show a complete, valid ad tag URL value.
- After the special case URL, be sure to nullify the override, as shown below.
- More details about adUrlOverride() are in the reference documentation in the SDK package.
. . . // To override the ad url, do this *before* setting the embed code: imaManager.setAdUrlOverride("http://pubads.g.doubleclick.net/gampad/ads?sz=640x480..."); . . set the embed code . // Remember to 'null' it out later if need be: As long as it is non-null, the value will override any IMA settings from Backlot. imaManager.setAdUrlOverride(null); . . .