I have been writing a new app for Windows Phone 8, taking advantage of the new Nokia maps built into the platform. All was going swimmingly, maps work well and quickly, problem with AR which I am working on, but everything seemed OK in testing.
I decided I would use the adcontrol, and offer a low-price purchase option if people want to get rid of the ads (always assuming someone downloads it). I used the adcontrol when I ported Pop Quiz and implemented it in code - so:-
adControlFSA = new AdControl("test_client", // ApplicationID
"Image480_80", // AdUnitID
true); // isAutoRefreshEnabled
if (adControlFSA != null)
adControlFSA.Width = 480;
adControlFSA.Height = 80;
adControlFSA.VerticalAlignment = VerticalAlignment.Bottom;
adControlFSA.HorizontalAlignment = HorizontalAlignment.Center;
Grid grid = (Grid)this.LayoutRoot.Children;
I plugged this in, ran the app, no errors, no adcontrol. Checked the visibility, the number of controls, the parent control, everything I could think of - still no dice. I then split the code out, generated a new project, targeting Windows Phone 8, ran the project - still no control!
Started a new project in VS2010 this time targeting 7.1, ran the project, and there was the ad control - WTF!!!
Chatted about it to colleagues, and twitterati, and still no joy. Reached out to Microsoft, and got the answer back - capabilities! The minimum capabilities you need are:-
Went back to my project, ran it, and the adcontrol appeared.
So if you hit the same problems - look at your capabilities.
Thanks Andy and Microsoft
Originally posted 5/Dec/2012