xaml - Pubcenter Ad is not clickable -
xaml - Pubcenter Ad is not clickable -
i'm bashing head weird problem, ads microsoft pubcenter not clickabkle when application uses d3d/xaml interop. see many games on windows store have pubcenter ads , uses d3d/xaml - how create 2 work ?
simple steps reproduce problem: (vs2013 - latest updates, pibcenter ctrl updated latest version)
vs2013 -> new -> project -> (visual c++ / store apps) -> directx , xaml app (windows phone)
(note: windows phone 8.1 app, not windows phone 8.1 silverlight app)
when project created, go directxpage.xaml
and edit follow:
<page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:adtest" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="using:microsoft.advertising.mobile.ui" x:class="adtest.directxpage" mc:ignorable="d"> <swapchainpanel x:name="swapchainpanel"> <!-- grid definition, place advertisement on bottom (may remove if no ads) --> <grid.rowdefinitions> <rowdefinition height="*"/> <rowdefinition height="50"/> </grid.rowdefinitions> <grid.columndefinitions> <columndefinition width="*"/> </grid.columndefinitions> <textblock text="hello xaml!" horizontalalignment="right" verticalalignment="top" fontsize="30" /> <ui:adcontrol grid.column="0" grid.row="1" x:name="adbanner" autorefreshintervalinseconds="60" applicationid="xxxxxxxxxxx" adunitid="xxxxx" horizontalalignment="right" height="50" isautorefreshenabled="true" margin="0,0,0,0" verticalalignment="bottom" width="320"/> </swapchainpanel> <!-- uncomment if using app bar in phone application. <page.bottomappbar> <commandbar> <appbarbutton icon="play" automationproperties.name="sample button" automationproperties.automationid="sampleappbarbutton" click="appbarbutton_click" /> </commandbar> </page.bottomappbar>--> </page>
replace xxxxx real app / unit ids , run sample - when banner shows up, seek click on -- not work :/ there way create clickable ? (it's not covered other controll, gets it's input properly, not know issue may be).
have solve problem? seems related beingness c++ app, lot of problems it. 1 workaround found advertisement method tapped control:
adpubcenter->tapped += ref new windows::ui::xaml::input::tappedeventhandler(this, &openglespage::onadtapped); void openglespage::onadtapped(platform::object^ sender, windows::ui::xaml::input::tappedroutedeventargs^ e){
and then
void openglespage::onadtapped(platform::object^ sender, windows::ui::xaml::input::tappedroutedeventargs^ e){ //handle touch (ie. opens game have) windows::system::launcher::launchuriasync(ref new uri("http://www.windowsphone.com/s?appid=bb8d4ce2-1853-47b6-9b0d-bb1af5a07436")); }
at to the lowest degree way advertisement when clicked.
xaml windows-phone-8 ads direct3d
Comments
Post a Comment