locked
[UWP][C++/CX] AdSDK Bug RRS feed

  • Question

  • Crash when Windows::UI::ViewManagement::ApplicationView::GetForCurrentView()->IsScreenCaptureEnabled = false.

    1. Create a blank UWP app.

    2. App.xaml.cpp

    void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e)
    {
    	auto _Window = Window::Current;
    	auto _Dispatcher = _Window->Dispatcher;
    	e->SplashScreen->Dismissed += ref new TypedEventHandler<SplashScreen^, Object^>([_Dispatcher](SplashScreen^ _Sender, Object^ _Args)
    	{
    		_Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new Windows::UI::Core::DispatchedHandler([]()
    		{
    			Windows::UI::ViewManagement::ApplicationView::GetForCurrentView()->IsScreenCaptureEnabled = false;
    		}));
    	});
    	_Window->Content = ref new MainPage();
    	_Window->Activate();
    }

    3. MainPage.xaml

    <Page x:Class="AppAdTest.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ad="using:Microsoft.Advertising.WinRT.UI">
    	<ad:AdControl ApplicationId="3f83fe91-d6be-434d-a0ae-7351c5a997f1" AdUnitId="10865275" Width="300" Height="50" HorizontalAlignment="Center" VerticalAlignment="Center" IsAutoRefreshEnabled="True"/>
    </Page>

    Sunday, October 18, 2015 2:35 PM

Answers

  • have reproduced, we are tracking as a bug.  I don't have eta on fix as yet, thanks for reporting.
    • Marked as answer by [-] Tuesday, June 7, 2016 8:55 PM
    Monday, October 19, 2015 4:11 PM