0
我想补充leadbolt广告控件,就像这里 leadbolt integration guideC#/ XAML WP8.1添加Leadbolt广告控制
首先,我下载Leadbolt SDK用于Windows Phone的8.1。 然后我创建了新的Windows Phone应用程序。有一个从MainPage.xaml中代码:
<Page
x:Class="App6.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App6"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Name="adWrapperGrid" >
<!-- wrap your content with grid -->
<Grid Name="yourContentGrid" Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
</Grid>
</Grid>
而且MainPage.xaml.cs中
using LeadBolt.Windows8.AppAd;
命名空间APP6 { 公共密封部分类的MainPage:页 { 私人AdController myController的; (); public MainPage() { this.InitializeComponent();
this.NavigationCacheMode = NavigationCacheMode.Required;
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
adWrapperGrid.Loaded += adWrapperGrid_Loaded;
}
void adWrapperGrid_Loaded(object sender, RoutedEventArgs e)
{
myController = new AdController(adWrapperGrid, "YOUR_LB_SECTION_ID");
myController.LoadAd();
}
protected override void OnNavigatedFrom(NavigationEventArgs e)
{
myController.DestroyAd();
adWrapperGrid.Loaded -= adWrapperGrid_Loaded;
base.OnNavigatedFrom(e);
}
}
}
所以,我所做的一切就像在链接,但是当我启动该应用程序它显示我一个空白屏幕,没有广告。
有人可以帮忙吗?或者推荐与Windows Phone 8.1应用程序配合使用的其他广告提供商,现在它已成为填充率接近0%的pubCenter?