Tutorial: Ads and Your Windows Phone App (Part 3 – AdDuplex)

To begin using the AdDuplex control in your Windows Phone app is relatively painless and should be something that you can fully implement in less than half an hour from start to finish.

You’ll need to do a little bit of prep work by signing up at AdDuplex.com – sign up with their engine and set up your app’s ad. Since AdDuplex started off purely as an exchange you are able to set up your own ads which will advertise your app on their network. As of May 2011 they’ve begun offering the ability to swap out some of your app’s ads and run paid ads instead but you’ll still need to set up an ad for yourself to get going.

Step 1. Definition
Define your app and download the AdDuplex control (See the web setup image included with this post)

Step 2. Installation
Unzip and add the DLL to your app via the standard Right-Click on References dialog (see the attached image)

Step 3: Configuration
Much like the AdMob code in the previous part of this series adding the Ad Duplex code is relatively straightforward.

Adjust the row definition at the top of your XAML file
[code lang="csharp"]
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
[/code]

and then add in the call to AdDuplex

[code lang="csharp"]
<Grid x:Name="AdGrid" Grid.Row="2" Margin="0,0,0,0">
<adduplex:AdControl Name="AdDuplex"
xmlns:adduplex="clr-namespace:AdDuplex;assembly=AdDuplex.AdControl.Silverlight"
AppId="1655"
Margin="0,0,0,0"
Visibility="Visible"
IsEnabled="True" />
</Grid>
[/code]

At this point you should have a working Ad call. You should run your app in either the emulator or on the device to ensure that an ad is served from AdDuplex. If it is then all is good – you are ready to go.

One last thing, after your app is approved by Microsoft you should return to AdMob and fill in your Zune deeplink – you can get the URL/ID directly from the App Marketplace admin where you upload and deploy your app.

Additional Links

Tutorial: Ads and Your Windows Phone App (Part 1)

Tutorial: Ads and Your Windows Phone App (Part 2) – AdMob

Tutorial: Ads and Your Windows Phone App (Part 3) – AdDuplex

Tutorial: Ads and Your Windows Phone App (Part 4) – Ad Failover Complete

AdDuplex Dcoumentation (Client Area)