问题
I've been struggling with this for weeks now, and can't figure out why it doesn't work. I'm beta testing my first app WP7 app and want to fund it by ad-banners. But all I see is a black square for a fractions of a second befor it turns invisible. The beta version of the app can be downloaded here: http://www.windowsphone.com/de-de/store/app/flyingfatty/196a2541-5989-48cd-8d0f-eacf988b47d7
To include the banners I took the following steps:
- download the Windows Phone Ad SDK (WPAdSDK-DEU.msi)
- add the Microsoft.Advertising.Mobile and Microsoft.Advertising.Mobile.UI Refernce to my project.
- add: xmlns:my="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI" to my xaml
- add a 80x480 AdControl Element to my xaml
- make a pub center account and register my app and the adcontrol. As categories I chose sports, travelling and shopping assuming, there's most ads in those categories
- paste the applications-ID and adunit-ID to my xaml like below
<my:AdControl AdUnitId="93769"
ApplicationId="32b430d7-aa81-440d-99a1-62c65e75f64a"
IsAutoRefreshEnabled="True"
Height="80"
HorizontalAlignment="Left"
Margin="0"
Name="adControlReal"
VerticalAlignment="Bottom"
Width="480" />
As mentioned above I see a black banner for a split-second before it dissapears. I also tried AdUnitId="Image480_800" and ApplicationId="test_client" for testing purposes but for the same effect.
What am I doing wrong?
回答1:
Try to subscribe to the error event to see why this is happening.
AdControl.ErroOccurrred Event
回答2:
I went through the same, my theory is the ads will display oftenly when the App has lots of downloads, the more popular the more ads and prints will have, if its a new App then it will show very few times, I say this because my App has 240+ downloads and the prints have been 250+ for which I have won $0.50 :) so it looks like if you see the square everything is fine
来源:https://stackoverflow.com/questions/12429319/adcontrol-dissapears-after-split-second-wp7