AdDuplex offers an universal app SDK in addition to its existing SDK for Windows Phone 7.8 and Windows Phone 8. This universal app SDK can be used with either universal Windows apps or standalone Windows 8.1 or Windows Phone 8.1 XAML apps.
Step 1. Register for a publisher account on AdDuplex
First thing first. If you don’t have an adduplex account, register on
http://www.adduplex.com
Step 2. Register a new app from your dashboard
Click on New App button in the dashboard to register a new app. We are building a Universal app which will run on both Windows Phone 8.1 and Windows 8.1. So we will need to register two new apps here, one for phone and other for desktop.
Enter the details for the app and choose an appropriate platform.
Once you create the app, note down the App ID which we will need while developing the application.
Step 3. Create a new Universal App project
The SDK can be used for either an universal app or standalone Windows 8.1 or Windows Phone 8.1 XAML apps. So in your Visual Studio Choose a Blank Universal app from the installed templates.
Step 4. Download the SDK from Visual Studio Gallery website
You can get the SDK from Visual Studio Gallery’s website. I am not sure if its available on Nuget too.
http://visualstudiogallery.msdn.microsoft.com/92f919ee-40a8-4549-8768-d3b453ceebea
Adding AdDuplex to Windows 8.1 app
Step 5. Add a Reference to AdDuplex SDK for Windows 8.1
In your Windows 8.1 project add a reference to AdDuplex SDK for Windows 8.1. From the Solution Explorer window, right click References…, and select Add New Reference…
Step 6. Add the namespace for AdDuplex in MainPage.xaml
Next, add a namespace for adduplex on the page where you wish to display ads.
Step 7. Add the AdDuplex adcontrol in your page
Finally add the code for adduplex’s AdControl in your page. Use the app id which you generated earlier while registering the app on adduplex’s website.
Note: Make sure the whole AdControl is visible by verifying that it’s not obstructed by any other objects on your page. We recommend setting the Canvas.ZIndex property to a high value to make sure the AdControl is not being covered.
That’s it. You can run the Windows 8.1 app on the local machine and hopefully an ad will appear.
Adding AdDuplex to Windows Phone 8.1 XAML App
Step 8. Add a reference to Windows Phone 8.1 XAML SDK
Similar to the Windows 8.1 app, you need to add a reference to AdDuplex SDK for Windows Phone 8.1(XAML) in your project for Windows Phone 8.1
Step 9. Add the namespace and adcontrol for AdDuplex in MainPage.xaml
Just like the Windows 8.1 app add the namespace and adcontrol to your page. Use the app id which you generated earlier while registering the app on adduplex’s website.
That’s it. You can run the Windows Phone 8.1 app on the emulator and hopefully an ad will appear.
Download full project AdDuplex-Ads.zip
Recent Comments