none
[uwp] No ads for test values on desktop. Why ? RRS feed

  • Question

  • https://docs.microsoft.com/en-us/windows/uwp/monetize/test-mode-values

    https://docs.microsoft.com/en-us/windows/uwp/monetize/supported-ad-sizes-for-banner-ads

    I have next code

    <UI:AdControl x:Name="AdvertisementControlMobile" Grid.Row="2" ApplicationId="3f83fe91-d6be-434d-a0ae-7351c5a997f1"
                          AdUnitId="10865270"
                          HorizontalAlignment="Stretch"
                          Height="50"
                          Width="300"
                          VerticalAlignment="Top"/>
            <UI:AdControl x:Name="AdvertisementControlDesktop" Grid.Row="2" ApplicationId="3f83fe91-d6be-434d-a0ae-7351c5a997f1"
                          AdUnitId="10865270"
                          HorizontalAlignment="Stretch"
                          Height="90"
                          Width="728"
                          VerticalAlignment="Top"/>

    No advertisment is shown on Desktop. Why ?


    Media Store

    Wednesday, March 15, 2017 3:23 PM

Answers

  • 1. The reason was that in Capability

    Internet ( Client ) should be checked !!!!

    2. Exta useful to subsribe on ErrorOccurred event

    <ads:AdControl
                    ApplicationId="3f83fe91-d6be-434d-a0ae-7351c5a997f1" AdUnitId="10865270"
                    Width="300" Height="50"
                    AdRefreshed="OnAdRefreshed"
                    ErrorOccurred="OnErrorOccurred"/>

    I found error by using this event.

    3. There are Extra usefull sample in GitHub SDK

    https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Advertising

    I decided to share my experience. Sorry for my mistake. But it was not easy to find.


    Media Store

    • Marked as answer by SmartWhy Wednesday, March 15, 2017 4:49 PM
    Wednesday, March 15, 2017 4:49 PM

All replies

  • 1. The reason was that in Capability

    Internet ( Client ) should be checked !!!!

    2. Exta useful to subsribe on ErrorOccurred event

    <ads:AdControl
                    ApplicationId="3f83fe91-d6be-434d-a0ae-7351c5a997f1" AdUnitId="10865270"
                    Width="300" Height="50"
                    AdRefreshed="OnAdRefreshed"
                    ErrorOccurred="OnErrorOccurred"/>

    I found error by using this event.

    3. There are Extra usefull sample in GitHub SDK

    https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Advertising

    I decided to share my experience. Sorry for my mistake. But it was not easy to find.


    Media Store

    • Marked as answer by SmartWhy Wednesday, March 15, 2017 4:49 PM
    Wednesday, March 15, 2017 4:49 PM
  • Hi SmartWhy,

    Thanks for your coming here to share this, it is very helpful to community members.

    Best regards,

    Cherry Bu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, March 16, 2017 7:25 AM
    Moderator