Design your Windows 8 app with ads in mind
Learn how to avoid design problems while adding ads to your half-ready app
Creating a game or app is fun! And the best part is getting that engine running, isn’t it? Everybody loves core functionality. But what about the rest? If you design for Windows 8, sooner or later you will have to think about charms, contracts, promotional images and maybe you want to make a few bucks with advertisement.
This post is about getting ads in your app as soon as possible. This way there will be less surprises when you submit the app.
For a new game I am developing I need to “fake” some ads in my design. The easiest way to do this is as follows:
Download the Microsoft Advertising SDK
- Download the Windows 8 Advertisement SDK
- Run W8AdSDK-ENU.msi and let it install.
- Restart Visual Studio 2012 (I had to do this)
- Create a reference to the Advertisement SDK:
Place a test ad on you XAML Page
- Create an xml namespace in the top of your page:
<Page xmlns:UI="using:Microsoft.Advertising.WinRT.UI" ...
- And place a test ad somewhere:
<UI:AdControl HorizontalAlignment="Left" Height="600" VerticalAlignment="Top" Width="160" Grid.Row="2" Margin="60,160,0,0" ApplicationId="d25517cb-12d4-4699-8bdc-52040c712cab" AdUnitId="10043134"/>
During the design of your app or game, you probably don’t need real ads. To get mockup ads from microsoft, make sure to set the
The AdUnitId determines the type of the ad. Here is a table with all possible values.
So if all goes well, you will see test ads appearing on your pages: