Test Ads Not Showing in Emulator


i have been @ couple of days searching within forums , other places on web, can't seem figure out.  have sample app i've added ads to, don't show on emulator.  i've followed steps in windows dev tools, can't figure out i'm doing wrong.

i using test_client applicationid , image480_80 for adunitid.  i've tried using application , ad unit ids given microsoft advertising pubcenter, same results.

i added using vs express windows phone, more comfortable blend visual studio once added in adcontrol , set capabilities in vs, saved project , continued working in blend.  ran project in both visual studio , blend test ads don't show in either of them.  when run project faint outline of box shows deploys disappears, yet can see faint outline in both vs , blend.  i have tried adding thick border, not borders show when deploy app.  i've placed within content panel, no luck.

this mainpage.xaml code looks like:

<phone:phoneapplicationpage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone" xmlns:shell="clr-namespace:microsoft.phone.shell;assembly=microsoft.phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="clr-namespace:microsoft.advertising.mobile.ui;assembly=microsoft.advertising.mobile.ui" x:class="phoneapp1.mainpage" mc:ignorable="d" fontfamily="{staticresource phonefontfamilynormal}" fontsize="{staticresource phonefontsizenormal}" foreground="{staticresource phoneaccentbrush}" supportedorientations="portraitorlandscape" orientation="portrait" shell:systemtray.isvisible="true" background="#ff26c90c" borderbrush="#ffff00f3"> <grid x:name="layoutroot" background="transparent" margin="0,0,0,163"> <grid.rowdefinitions> <rowdefinition height="auto"/> <rowdefinition height="*"/> </grid.rowdefinitions> <stackpanel x:name="titlepanel" grid.row="0" margin="12,17,0,28" background="red"> <textblock text="my application" style="{staticresource phonetextnormalstyle}" margin="12,0" foreground="black" fontsize="13.333"/> <textblock text="page name" margin="9,-7,0,0" style="{staticresource phonetexttitle1style}" foreground="black" fontsize="40"/> </stackpanel> <grid x:name="contentpanel" grid.row="1" margin="12,0,12,0" background="#ff950000"> <textblock horizontalalignment="left" height="190" margin="48,114,0,0" textwrapping="wrap" verticalalignment="top" width="288" fontsize="64" foreground="white"> <run text="content"/> <linebreak/> <run text="here"/> </textblock> </grid> <ui:adcontrol x:name="adcontrol" applicationid="test_client" adunitid="image480_80" height="80" margin="6,513,6,-149" grid.row="1" borderthickness="3" foreground="{x:null}" /> </grid> </phone:phoneapplicationpage>

this wmappmanifest.xaml:

<?xml version="1.0" encoding="utf-8"?> <deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" appplatformversion="8.0"> <defaultlanguage xmlns="" code="en-us" /> <app xmlns="" productid="{5592d8da-f502-46d1-9eae-80ebea599ed6}" title="phoneapp1" runtimetype="silverlight" version="1.0.0.0" genre="apps.normal" author="phoneapp1 author" description="sample description" publisher="phoneapp1" publisherid="{1390a68c-aeb7-4e84-bb9a-954f4d46e73e}"> <iconpath isrelative="true" isresource="false">assets\applicationicon.png</iconpath> <capabilities> <capability name="id_cap_networking" /> <capability name="id_cap_medialib_audio" /> <capability name="id_cap_medialib_playback" /> <capability name="id_cap_sensors" /> <capability name="id_cap_webbrowsercomponent" /> <capability name="id_cap_identity_user" /> <capability name="id_cap_medialib_photo" /> <capability name="id_cap_phonedialer" /> </capabilities> <tasks> <defaulttask name="_default" navigationpage="mainpage.xaml" /> </tasks> <tokens> <primarytoken tokenid="phoneapp1token" taskname="_default"> <templateflip> <smallimageuri isrelative="true" isresource="false">assets\tiles\flipcycletilesmall.png</smallimageuri> <count>0</count> <backgroundimageuri isrelative="true" isresource="false">assets\tiles\flipcycletilemedium.png</backgroundimageuri> <title>phoneapp1</title> <backcontent> </backcontent> <backbackgroundimageuri> </backbackgroundimageuri> <backtitle> </backtitle> <devicelockimageuri> </devicelockimageuri> <haslarge> </haslarge> </templateflip> </primarytoken> </tokens> <screenresolutions> <screenresolution name="id_resolution_wvga" /> <screenresolution name="id_resolution_wxga" /> <screenresolution name="id_resolution_hd720p" /> </screenresolutions> </app> </deployment>


and, in case, app.xaml.cs:

using system; using system.diagnostics; using system.resources; using system.windows; using system.windows.markup; using system.windows.navigation; using microsoft.phone.controls; using microsoft.phone.shell; using phoneapp1.resources; namespace phoneapp1 { public partial class app : application { /// <summary> /// provides easy access root frame of phone application. /// </summary> /// <returns>the root frame of phone application.</returns> public static phoneapplicationframe rootframe { get; private set; } /// <summary> /// constructor application object. /// </summary> public app() { // global handler uncaught exceptions. unhandledexception += application_unhandledexception; // standard xaml initialization initializecomponent(); // phone-specific initialization initializephoneapplication(); // language display initialization initializelanguage(); // show graphics profiling information while debugging. if (debugger.isattached) { // display current frame rate counters. application.current.host.settings.enableframeratecounter = true; // show areas of app being redrawn in each frame. //application.current.host.settings.enableredrawregions = true; // enable non-production analysis visualization mode, // shows areas of page handed off gpu colored overlay. //application.current.host.settings.enablecachevisualization = true; // prevent screen turning off while under debugger disabling // application's idle detection. // caution:- use under debug mode only. application disables user idle detection continue run // , consume battery power when user not using phone. phoneapplicationservice.current.useridledetectionmode = idledetectionmode.disabled; } } // code execute when application launching (eg, start) // code not execute when application reactivated private void application_launching(object sender, launchingeventargs e) { } // code execute when application activated (brought foreground) // code not execute when application first launched private void application_activated(object sender, activatedeventargs e) { } // code execute when application deactivated (sent background) // code not execute when application closing private void application_deactivated(object sender, deactivatedeventargs e) { } // code execute when application closing (eg, user hit back) // code not execute when application deactivated private void application_closing(object sender, closingeventargs e) { } // code execute if navigation fails private void rootframe_navigationfailed(object sender, navigationfailedeventargs e) { if (debugger.isattached) { // navigation has failed; break debugger debugger.break(); } } // code execute on unhandled exceptions private void application_unhandledexception(object sender, applicationunhandledexceptioneventargs e) { if (debugger.isattached) { // unhandled exception has occurred; break debugger debugger.break(); } } #region phone application initialization // avoid double-initialization private bool phoneapplicationinitialized = false; // not add additional code method private void initializephoneapplication() { if (phoneapplicationinitialized) return; // create frame don't set rootvisual yet; allows splash // screen remain active until application ready render. rootframe = new phoneapplicationframe(); rootframe.navigated += completeinitializephoneapplication; // handle navigation failures rootframe.navigationfailed += rootframe_navigationfailed; // handle reset requests clearing backstack rootframe.navigated += checkforresetnavigation; // ensure don't initialize again phoneapplicationinitialized = true; } // not add additional code method private void completeinitializephoneapplication(object sender, navigationeventargs e) { // set root visual allow application render if (rootvisual != rootframe) rootvisual = rootframe; // remove handler since no longer needed rootframe.navigated -= completeinitializephoneapplication; } private void checkforresetnavigation(object sender, navigationeventargs e) { // if app has received 'reset' navigation, need check // on next navigation see if page stack should reset if (e.navigationmode == navigationmode.reset) rootframe.navigated += clearbackstackafterreset; } private void clearbackstackafterreset(object sender, navigationeventargs e) { // unregister event doesn't called again rootframe.navigated -= clearbackstackafterreset; // clear stack 'new' (forward) , 'refresh' navigations if (e.navigationmode != navigationmode.new && e.navigationmode != navigationmode.refresh) return; // ui consistency, clear entire page stack while (rootframe.removebackentry() != null) { ; // nothing } } #endregion // initialize app's font , flow direction defined in localized resource strings. // // ensure font of application aligned supported languages , // flowdirection each of languages follows traditional direction, resourcelanguage // , resourceflowdirection should initialized in each resx file match these values // file's culture. example: // // appresources.es-es.resx // resourcelanguage's value should "es-es" // resourceflowdirection's value should "lefttoright" // // appresources.ar-sa.resx // resourcelanguage's value should "ar-sa" // resourceflowdirection's value should "righttoleft" // // more info on localizing windows phone apps see http://go.microsoft.com/fwlink/?linkid=262072. // private void initializelanguage() { try { // set font match display language defined // resourcelanguage resource string each supported language. // // fall font of neutral language if display // language of phone not supported. // // if compiler error hit resourcelanguage missing // resource file. rootframe.language = xmllanguage.getlanguage(appresources.resourcelanguage); // set flowdirection of elements under root frame based // on resourceflowdirection resource string each // supported language. // // if compiler error hit resourceflowdirection missing // resource file. flowdirection flow = (flowdirection)enum.parse(typeof(flowdirection), appresources.resourceflowdirection); rootframe.flowdirection = flow; } catch { // if exception caught here due either // resourcelangauge not being correctly set supported language // code or resourceflowdirection set value other lefttoright // or righttoleft. if (debugger.isattached) { debugger.break(); } throw; } } } } 



any appreciated.



Windows and Windows phone apps  >  AdSDK Integration & Ad Mediation



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'