To add AdDuplex Interstitial Ads to your Windows Phone Silverlight project do the following:
- Go to Tools -> NuGet Package Manager -> Package Manager Console (or Tools -> Library Package Manager -> Package Manager Console when in Visual Studio 2012 or below)
- Run the Install-Package command:
PM> Install-Package AdDuplexWP8
To start participating in the exchange:
- Register your Windows Phone app in AdDuplex system and write down your Ad unit ID and App key.
- Add the following line to the Application_Launching method in the App.xaml.cs file
AdDuplex.AdDuplexClient.Initialize("YOUR_APP_KEY");
- Create an insterstitial instance and show the ad
AdDuplex.InterstitialAd interstitialAd =
new AdDuplex.InterstitialAd("YOUR_AD_UNIT_ID");
interstitialAd.ShowAd(); - In order to improve the user experience you can pre-cache ads by calling
interstitialAd.LoadAd();
Comments