MillenialMedia support

Feb 9, 2013 at 1:49 PM
Hello,
I'm trying Unified Ad Control but I have a problem with MillenialMedia integration. When I launch it in test mode using MillenialMedia as Fallback the app crashes.

This is my code (I have removed other providers' informations):
    <Ads:AdControl x:Name="AdBasic" Margin="0" Width="480" Height="80" VerticalAlignment="Bottom"
            FallbackAdProviderName="MillennialMedia"
            IsTest="True"
            xmlns:Ads="clr-namespace:MC.Phone.Ads;assembly=MC.Phone.Ads"
            ...
            xmlns:MillennialMedia="clr-namespace:MC.Phone.Ads.MillennialMedia;assembly=MC.Phone.Ads.MillennialMedia"
            xmlns:InnerActive="clr-namespace:MC.Phone.Ads.InnerActive;assembly=MC.Phone.Ads.InnerActive"
             >

        <Ads:AdControl.AdProviders >
            <Provider:GenericAdProviderForXaml XamlUri="http://remoteurlontheinternet.com/Ad.xaml?appid={0}" />
            <Provider:NoneAdProvider />
            <!-- ... other providers -->
            <MillennialMedia:MillennialMediaAdProvider Apid="myapid_numeric_code" />

        </Ads:AdControl.AdProviders>
    </Ads:AdControl>
What could be the problem? Am I wrong somewhere?

Thanks in advance,
Francesco
Feb 10, 2013 at 7:42 PM
Hi Francesco,

Could you provide the stacktrace? That is something that would help.

Best,

Mark Monster
Feb 10, 2013 at 9:11 PM
Hi Mark,

today I have done some changes and now it works well. :-)

Probably yesterday I did some errors in the xaml.

The working code is the following:
        <Ads:AdControl x:Name="AdBasic" Margin="0" Width="480" Height="80" VerticalAlignment="Bottom"
                FallbackAdProviderName="AdDuplex"
                IsTest="False"
                xmlns:Ads="clr-namespace:MC.Phone.Ads;assembly=MC.Phone.Ads"
                xmlns:PubCenter="clr-namespace:MC.Phone.Ads.PubCenter;assembly=MC.Phone.Ads.PubCenter"
                xmlns:Smaato="clr-namespace:MC.Phone.Ads.Smaato;assembly=MC.Phone.Ads.Smaato"
                xmlns:MobFox="clr-namespace:MC.Phone.Ads.MobFox;assembly=MC.Phone.Ads.MobFox"
                xmlns:AdMob="clr-namespace:MC.Phone.Ads.AdMob;assembly=MC.Phone.Ads.AdMob"
                xmlns:Provider="clr-namespace:MC.Phone.Ads.Provider;assembly=MC.Phone.Ads"
                xmlns:AdDuplex="clr-namespace:MC.Phone.Ads.AdDuplex;assembly=MC.Phone.Ads.AdDuplex"
                xmlns:InnerActive="clr-namespace:MC.Phone.Ads.InnerActive;assembly=MC.Phone.Ads.InnerActive"
                xmlns:MillennialMedia="clr-namespace:MC.Phone.Ads.MillennialMedia;assembly=MC.Phone.Ads.MillennialMedia"
                >
            
                <Ads:AdControl.AdProviderStrategy>
                <Strategy:RemoteAdProviderStrategy xmlns:Strategy="clr-namespace:MC.Phone.Ads.Strategy;assembly=MC.Phone.Ads"
                                                   LocalProviderSettingsUri="local_provider_settings_uri"
                                                   RemoteProviderSettingsUri="remote_provider_settings_uri"  />
                </Ads:AdControl.AdProviderStrategy>
            <Ads:AdControl.AdProviders >
                <Provider:GenericAdProviderForXaml XamlUri="http://remoteurlontheinternet.com/Ad.xaml?appid={0}" />
                <Provider:NoneAdProvider />
                <AdDuplex:AdDuplexAdProvider App="id" />
                <AdMob:AdMobAdProvider AdUnit="id" />
                <MobFox:MobFoxAdProvider Publisher="id" />
                <Smaato:SmaatoAdProvider AdSpace="id"
                                    Publisher="id" />
                <PubCenter:PubCenterAdProvider Application="id"
                                        AdUnit="id" />
                <!--InnerActive is not really suitable for the Ad Rotation because it doesn't have any events to react on.-->
                <InnerActive:InnerActiveAdProvider App="id" />
                <MillennialMedia:MillennialMediaAdProvider Apid="id />

            </Ads:AdControl.AdProviders>
        </Ads:AdControl>
Congratulations for the framework that is very useful and well-written!

Best,
Francesco Argese