广告 windows 应用开发

Ads windows app development

我目前正在编写 Windows 商店应用程序。我添加了一个带有示例广告 ID 的广告。现在我想自己在 windows 开发中心注册广告。但是它没有出现并且发生了错误(调用了方法)。在商店成功上传之前,我不能使用自己的广告 ID 吗?或者我哪里做错了?

所以这里我的代码 XXX 当然是秘密的:

InterstitialAd adname = new InterstitialAd(); //new Ad in Video Format

var APPID = "XXX-XXXX-XXXX-XXXX-XXX"; //numbers and letters
var MyAdUnitId = "XXXXX"; //numbers
adname.AdReady += rdy;
adname.ErrorOccurred += Ezmoneyezlife_ErrorOccurred;
adname.Cancelled += Ezmoneyezlife_Cancelled;
adname.RequestAd(AdType.Video, APPID, MyAdUnitId);

adname.Show();

取自https://msdn.microsoft.com/en-us/library/advertising-mobile-windows-phone-8-adcontrol-visual-designer(v=msads.20).aspx

Live ads will not display in the emulator. In order to receive live ads in the app you submit to the store you will need to replace the test values of the AdControl with the live values from pubCenter. For more information, see Getting Access to Microsoft pubCenter and Receiving Ads.