UWP Ad Controls are broken

288 Views Asked by At

I have a UWP app, published in store, here. The app hosts AdControl in some pages and the current version of the app has AdControl but I have no way of confirming if the app is working on other systems but it's not working on my laptop (Windows 10 Creators Update - clean install).

This issue has just recently popped up when my Store submission failed twice and the reason was that my app wasn't launching at all. The app was working fine in Debug mode but when I compiled the app in Release mode, it was actually not working. I have no other windows systems to check if it is a system specific issue just related to my laptop or maybe it is related to AdControls everywhere.

If the pages in my app doesn't have a AdControl the app works fine. I debugged the code and it would not pass through the Page Initializing function, and there I found out that while initializing the pages, the last thing to pass through was the AdControl and when I removed the AdControl the app was working fine and it would still navigate to those pages without AdControl.

Did someone else experience this issue? Maybe download my app and let me know if it works on your system.

this is how I am using the AdControl:

    xmlns:ads="using:Microsoft.Advertising.WinRT.UI"
    <ads:AdControl Grid.Row="4"
                   x:Name="Movies_AdControl"
                   Margin="0,10,0,0"
                   AutoRefreshIntervalInSeconds="15">
    </ads:AdControl>

and also in the VisualStateGroup

    <Setter Target="Movies_AdControl.Height"
            Value="50"/>
    <Setter Target="Movies_AdControl.Width"
            Value="320"/>
1

There are 1 best solutions below

1
On BEST ANSWER

@Ahmar, there is a known issue with the Windows 10 UWP AdControl that started about a week ago. Unfortunately the AdControl is part of the framework ad sdk which means Microsoft can push out updates to it any time and break all the apps that use it (which is exactly what they did last week).

The reason your new project might work is because you are doing very little other work in the Page contructor. It seems to be a timing glitch that prevents the Loaded event from ever firing (not all of the controls on the page initialize). Try putting a bunch of other controls on the page and you might be right back to having the problem.

The good news is that the problem was finally fixed with the Ad SDK 10.0.5 which has internal version numbers of 10.1705.11001. The bad news is that even if you build your app with that version of the sdk and submit it to the Windows Store, it is still possible that your users have the older broken sdk and until that update is pushed to everybody, there will be problems.

The idea of store framework packages is a bad idea to me. Good in theory due to smaller downloads and potentially rapid and automatic deployments by Microsoft, but bad when Microsoft is sloppy like they were here.

Discussion: https://social.msdn.microsoft.com/Forums/windowsapps/en-US/1d5e1f23-bd61-4384-b55c-2d0cae8d4a03/new-adcontrol-freezes-apps?forum=aiasdk