Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Hello I'm updating a MVVM Windows phone 8.1 app to UWP and have run into a problem.

The adControl correctly shows ads when the app is lunched, but when the user then navigates to a different page and then back the adControl simply stops updating.

I have set:

IsAutoRefreshEnabled="True"

and

AutoRefreshIntervalInSeconds="60"

i also tried checking

ErrorOccurred="AdControl_ErrorOccurred"

but nothing fires here after navigation back.

I am using the

SystemNavigationManager to let the user navigate back.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
802 views
Welcome To Ask or Share your Answers For Others

1 Answer

For anyone still struggling with this bug that Microsoft has still not on 28-03-2016 fixed, what I did was use admeditator instead(it also has the bug), and then call the following on page navigation.

protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
    {
        this.AdMediator_ECB2E3.Disable();
        base.OnNavigatingFrom(e);
    }

    protected override void OnNavigatedTo(NavigationEventArgs e)
    {
        this.AdMediator_ECB2E3.Resume();
        base.OnNavigatedTo(e);
    }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...