Can't get ads to show up.

Feb 25, 2013 at 8:17 PM
Edited Feb 25, 2013 at 8:22 PM
Hey guys!

I believe I've set this up properly but for some reason I can't get ads showing up inside of my emulator or on my device for my XNA game!

Here is my ad settings file:
<?xml version="1.0" encoding="utf-8" ?>
<AdSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CultureDescriptors>
    <AdCultureDescriptor CultureName="en-US">
      <Probabilities Probability="0" AdType="InnerActive" AppID="XXXXXX" />
      <Probabilities Probability="15" AdType="MobFox" AppID="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" IsTest="false"/>
      <Probabilities Probability="50" AdType="PubCenter" AppID="xxxxxxxxxxxxxxxxxxxxxx" SecondaryID="xxxxxx"/>
      <Probabilities Probability="20" AdType="Smaato" AppID="xxxxxxxxxxxx" SecondaryID="xxxxxxxxxxx" />
      <Probabilities Probability="15" AdType="AdDuplex" AppID="xxxxx"/>
    </AdCultureDescriptor>
    <AdCultureDescriptor CultureName="en-GB">
      <Probabilities Probability="0" AdType="InnerActive" AppID="xxxxxxxxxxxxxxxxxxxxxxxxxx" />
      <Probabilities Probability="15" AdType="MobFox" AppID="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" IsTest="false"/>
      <Probabilities Probability="50" AdType="PubCenter" AppID="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" SecondaryID="xxxxxx"/>
      <Probabilities Probability="20" AdType="Smaato" AppID="xxxxxxxxxx" SecondaryID="xxxxxxxxxxxx" />
      <Probabilities Probability="15" AdType="AdDuplex" AppID="xxxxx"/>
    </AdCultureDescriptor>
    <AdCultureDescriptor CultureName="de-DE">
      <Probabilities Probability="0" AdType="InnerActive" AppID="xxxxxxxxxxxxxxxxxxxxxx" />
      <Probabilities Probability="30" AdType="MobFox" AppID="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" IsTest="false"/>
      <Probabilities Probability="30" AdType="Smaato" AppID="xxxxxxxxxxxxxx" SecondaryID="xxxxxxxxxxx" />
      <Probabilities Probability="20" AdType="PubCenter" AppID="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" SecondaryID="xxxxxxxxx"/>
      <Probabilities Probability="20" AdType="AdDuplex" AppID="xxxxx"/>
    </AdCultureDescriptor>
    <AdCultureDescriptor CultureName="default">
      <Probabilities Probability="0" AdType="InnerActive" AppID="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
      <Probabilities Probability="30" AdType="MobFox" AppID="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" IsTest="false"/>
      <Probabilities Probability="30" AdType="PubCenter" AppID="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" SecondaryID="xxxxxxx"/>
      <Probabilities Probability="10" AdType="AdDuplex" AppID="xxxxx"/>
      <Probabilities Probability="30" AdType="Smaato" AppID="xxxxxxxxxxxxxxx" SecondaryID="xxxxxxxxxxxxx" />
    </AdCultureDescriptor>
  </CultureDescriptors>
</AdSettings>
I've set it up like so:
        protected override void Initialize()
        {
#if !FREE
            if (Guide.IsTrialMode)
            {
#endif
                // Initialize the AdGameComponent and add it to the game's Component object
                AdRotatorXNAComponent.Initialize(this);
                AdRotatorXNAComponent.Current.AdPosition = new Vector2((GraphicsDevice.Viewport.Bounds.Width - 500) / 2 - 30, 400);

                //Optionally specify the slide (popup) direction for the Ad
                //AdRotatorXNAComponent.Current.SlidingAdDirection = SlideDirection.Bottom;

                //Optionally Set the local configuration file used to set the default Ad Locations
#if FREE
                AdRotatorXNAComponent.Current.DefaultSettingsFileUri = "/PaiGow;component/defaultAdSettingsFree.xml";
#else
                AdRotatorXNAComponent.Current.DefaultSettingsFileUri = "/PaiGow;component/defaultAdSettingsPaid.xml";
#endif
                //Optionally set a URL from where to pull the configuration file down remotely each time the game is run
#if FREE
                AdRotatorXNAComponent.Current.SettingsUrl = "http://www.zzzzzzzzzz.com/app_files/defaultAdSettingsFree.xml";
#else
                //AdRotatorXNAComponent.Current.SettingsUrl = "http://www.zzzzzzzzzz.com/app_files/defaultAdSettingsPaid.xml";
#endif
                AdRotatorXNAComponent.Current.DrawOrder = 1000;

                //Add the control to the XNA Component list which will display the ad
                //Note as this is XNA be sure to just to this for the game states you want it shown.
                AdRotatorXNAComponent.Current.Enabled = true;
                AdRotatorXNAComponent.Current.Visible = true;
                Components.Add(AdRotatorXNAComponent.Current);
#if !FREE
            }
#endif
            base.Initialize();
.....
}
And this is what the capabilities in my WMAppManifest.xml is:
<Capabilities>
      <Capability Name="ID_CAP_IDENTITY_USER"></Capability>
      <Capability Name="ID_CAP_LOCATION"></Capability>
      <Capability Name="ID_CAP_MEDIALIB"></Capability>
      <Capability Name="ID_CAP_NETWORKING"></Capability>
      <Capability Name="ID_CAP_PHONEDIALER"></Capability>
      <Capability Name="ID_CAP_WEBBROWSERCOMPONENT"></Capability> 
    </Capabilities>
Is there something I'm missing here???

Thanks,

PkL728
Feb 26, 2013 at 7:08 PM
Well your config looks fine (although if you set something to 0%, better to just remove that line than make the config more complex)
And your code looks OK.

Have you checked the Build action to Content and set the “Copy option” to “Copy if newer”
And if you browse manually to your remote config file, can you view the XML in internet explorer or download the file?

Hope this helps.
Mar 22, 2013 at 11:57 PM
I eventually got this working.... I had to call Invalidate() once to get the new ad to be populated. Seems like kind of a hack, but it worked...
Mar 23, 2013 at 2:56 AM
If you check the documentation, you have to call "Invalidate()" in your pages Loaded event or at any point after that to start ads.
AdRotator doesn't start ads for you so the developer has full control over when Ads Start.