Sep 24, 2014 at 8:04 AM
Edited Sep 24, 2014 at 10:11 AM
Hi I have just upgraded to the new AdRotator V2 and have a few questions about the changes.
Previously I would call OnPageLoaded()
if (TrialExperienceHelper.LicenseMode == TrialExperienceHelper.LicenseModes.Trial)
// Kick start AdRotator controls
// Call for AdRotator
AdRot2.Visibility = Visibility.Visible;
AdRot2.IsEnabled = true;
// Register handlers for log information
AdRot2.Log += AdRot2_Log;
catch (Exception ex)
Debug.WriteLine("AdRotators failed to invalidate! exception= " + ex.Message);
I didn't need to add any other code as I was only using AdDuplex and PubCenter. Now V2 is stable I want to add Inmobi and Smaato but I can get them to show ad's (actually no ad's are showing only black space).
I notice Invalidate takes an argument of AdRotator.Model.AdProvider but not sure what to pass it? I have tried creating ad provider objects in but with no luck, could you give an example? Also I don't see the Log method any more has it been changed?
Example of config file:
<PubCenter AppId="ba595004-2934-4cfe-b783-XXXXXXXXXXX" SecondaryId="XXXXXX" Probability="80" AdOrder="1"/>
<Smaato AppId="XXXXXX" SecondaryId="XXXXXX" Probability="10" AdOrder="2"/>
<Inmobi AppId="XXXXXXX" Probability="10" AdOrder="3"/>
<AdDuplex AppId="XXXXXX" Probability="0" AdOrder="4"/>
RemoteSettingsLocation="My remote location"
Just one other thing Smaato ad's size is 320 x 50 but as most other providers are 480x80 would this leave a gap around the control? Is there a way to configure this at runtine or else?
If the user navigated away from the page in browser I used to call Invalidate again to refresh it!
Is it a case that I now have to create provider objects in code to initialise them?
I'm using Windows Phone 8 Silverlight :)
Update: OK I've got it working, it seems that the PubCenter ad which is the first ordered in the XML config file was and still is displaying a black box. I removed the line and the others are now displaying! I thought that if an ad could not display then the
next ad in-line would be displayed instead (if ordered)? Maybe I've set it up incorrectly?