AdRotator for XNA 0.4

Jan 16, 2013 at 6:18 PM

Hi there,

I am using the WP7AdRotator 0.4 for XNA lib. Everything seems working well except I am not able to verify if Smaato ads would work or not.

I want to test Smaato ads by setting the AppId and PublisherId properties for Smaato from C# code using the AdRotatorXNAComponent.Current object. But it seems the smaato is missing from this package. I could only see PubCenterAppId, AdDuplexAppId, InneractiveAppId, MobFoxAppId.   

Does this package (0.4) support Smaato ads? The example which came with the binary package has Smaato ads in the default settings xml though.

Thanks for your help!


Jan 16, 2013 at 7:29 PM

There are 2 versions of the xna 0.4 all, one which requires the location requirement enabled (location aware) and one which doesnt


due to issues with the non-location aware all from Smaato all (still requires the cap enabled) we didn't include it with the nin location aware version.

the location aware version includes Smaato but requires you to enable ID_CAP_LOCATION capability in yourvsolution

hope this helps

Jan 16, 2013 at 8:32 PM

Thanks Darkside for your quick reply! I got the right stuff and it works now. Great help.


Jan 17, 2013 at 9:37 PM

Hi Darkside,

Could you please confirm if this library works and how to initialize with XNA/Silverlight framework? My game is a mix XNA/Silverlight so the main page is derived from PhoneApplicationPage, not from the Microsoft.Xna.Framework.Game class. I cannot initialize the library by calling AdRotatorXNAComponent.Initialize(this); because "this" is invalid.

Thanks a lot!


Jan 18, 2013 at 12:05 AM

For SilverXNA scenarios we recommend you use the Silverlight/XAML control rather than the XNA one.

Primarily because he SilverXNA projects don't support XNA cmponents

Jan 18, 2013 at 4:45 PM

The Silverlight/XAML works just on Silverlight/XAML page. It crashes on the game page. I guess this is the limitation of the library or do you have some example code to make it work on XNA codes?


Jan 18, 2013 at 6:03 PM

Check the monster sample pack and the demo's.  We show AdRotator working fine in both Silverlight and XNA screen

Jan 28, 2013 at 9:34 PM

Hi Darkside,

I downloaded and checked the code from the monster sample demo projects. Unfortunately, there seems to be no solution for Silverlight/XNA mixed app. The demo is either a pure XNA app or then pure Silverlight app. Not the mixed one introduced in WP7.1 Mango.

Am I still missing some reference or this is the real limitation of the library?



Jan 28, 2013 at 11:00 PM

Seems I never got round to adding the SilverXNA projects using AdRotator to the main Monster Sample set, my bad.

They are still available on codeplex as they are the Starter 2D & 3D projects from the tutorials on my blog, you can find the full source for them here:


Hope that helps.


For SilverXNA projects I recommend putting AdRotator as a control in the XAML for the game page