The AdControl couldn't show in my unity5 app, looking for help

Hi everyone,
I want to add the AdControl to my app, but after doing everthing in the msdn guide, the AdControl still didn’t show in my app.
There’s no error or warning returns, it’s just disappeared. I don’t know why.
I build a Phone8.1 solution
2151880--142060--upload_2015-6-10_15-54-14.png
and here’s my MainPage.xaml code

<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Template"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:UI="using:Microsoft.Advertising.Mobile.UI"
    x:Class="Template.MainPage"
    IsTabStop="false"
    mc:Ignorable="d">

    <SwapChainPanel x:Name="DXSwapChainPanel">
        <Grid x:Name="ExtendedSplashGrid">
            <Image x:Name="ExtendedSplashImage" Source="Assets/SplashScreen.png" VerticalAlignment="Center" HorizontalAlignment="Center"/>
            <UI:AdControl AutoRefreshIntervalInSeconds="60" ApplicationId="test_client" AdUnitId="Image320_50" HorizontalAlignment="Left" Height="50" IsAutoRefreshEnabled="True" Margin="27,10,0,0" VerticalAlignment="Top" Width="320"/>
        </Grid>
    </SwapChainPanel>
</Page>

I think I’ve installed the SDK right, because I can test the AdControl in a blank app which built by VS.

Does any one knows what the problem is?

Yes, you need a frame. Search this forum, it has been asked multiple times.

I’ve been using the prime31 package, no results too.
Is this the same case ?

You need to modify App.xaml.cs in generated solution to create a Frame and navigate to MainPage instead of creating it directly and setting as content.
There have been code examples in this forum.

1 Like

EDIT:
I’ve tried your method but it seems to fail the RemoveSplashScreen()
if (rootFrame == null && !appCallbacks.IsInitialized())
{
var frame = new Frame();
var mainPage = new MainPage(splashScreen);
Window.Current.Content = frame;

frame.Navigate(typeof(MainPage),splashScreen);
Window.Current.Activate();

Hi, thanks for the answer but I’m really not sure how to create a Frame and the MainPage navigation process.Would be glad if you share more details.
Thank you for your time.

You must put the the AdControl outside the ExtendedSplashScreenGrid grid control in your XAML. The ExtendedSplashScreenGrid is removed when the splash screen is hidden.