我已经在我的 uwp 应用程序上实现了 Microsoft 广告,但它总是显示相同的广告,如下所示:
这是实现的代码。
void MainWindow::showAd()
{
auto adControl = ref new AdControl();
// Set the application id and ad unit id
// The application id and ad unit id can be obtained from Dev Center.
// See "Monetize with Ads" at https ://msdn.microsoft.com/en-us/library/windows/apps/mt170658.aspx
adControl->ApplicationId = L"------";
adControl->AdUnitId = L"------";
// Set the dimensions
adControl->Width = 50;
adControl->Height = 300;
// Add event handlers if you want
adControl->AdRefreshed += ref new EventHandler<RoutedEventArgs^>(this, &OpenGLESPage::OnAdRefreshed);
adControl->VerticalAlignment = Windows::UI::Xaml::VerticalAlignment::Top;
// adControl-? = Windows::UI::Xaml::Visibility::Visible;
// Add the ad control to the page
// auto parent = mPage->Parent;
// parent->Append(adControl);
swapChainPanel->Children->Append(adControl);
}
为什么微软广告总是显示与上面相同的图像?我在调试模式下收到了这个广告。它与调试或发布模式有关吗?