Can I use one AdControl in a Windows 8.1 application with multiple AdUnitId s? I followed the approach from various sources on the network to slightly improve the performance of AdControl , but now I found (after adding the event handler to the AdControl ErrorOccurred event) that the error code is NoAdAvailable , which means that there are no ads for the selected category (I'm in Germany) . The code for my AdControl as follows:
AdControl adControl = new AdControl { ApplicationId = "a1b2c3d4-1a2a-1234-1a2a-1a2b3c4d5e6f", AdUnitId = "123456", HorizontalAlignment = HorizontalAlignment.Left, Height = 250, VerticalAlignment = VerticalAlignment.Top, Width = 250 }; adControl.ErrorOccurred += adControl_ErrorOccurred;
According to the information provided by Microsoft pubCenter, ApplicationId remains the same (as expected) when I add several categories for ads, but AdUnitId changes. How can I use ads from several categories, is there a simple solution? Or do I need to try to create an AdControl instance by changing the category (and therefore AdUnitId , until I get the exception and then take advantage of this? What would be the best approach?
Update
You are not allowed to modify AdUnitId after installing it, so this will not work.
Update 2
I'm still not sure that everything is configured correctly - when I launch my application (installed from the Windows App Store), I always get the error message "NoAdsAvailable". The category from which ads should be shown is βGames,β so the error message states that (for my region) there are no ads from this category. When I use different applications with ads, they show ads, which should be from the category of games, so for some reason Iβm afraid that I may not succeed all right.
Does anyone have any ideas?
c # windows-store-apps
Gorgsenegger
source share