こちらのリードボルト統合ガイドのように、リードボルト広告コントロールを追加したい
まず、Windows Phone 8.1 用の Leadbolt SDK をダウンロードしました。次に、新しい 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 { public 封印された部分クラス MainPage : Page { プライベート 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 になっていますか?