Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Retaining page Navigation stack when app is killed

$
0
0

Is there a simple way to retain the current navigation stack of pages in Application.OnSleep to be reinstated in Application.OnResume? I tried the following:
protected override void OnSleep ()
{
Application.Current.Properties ["MainPage"] = MainPage;
}

But then the app timed out when resuming with hundreds of log entries like this:
[Mono] GC_MAJOR: (Degraded mode overflow) pause 57.05ms, total 67.37ms, bridge 31.19ms major 21248K/37472K los 8K/8K
[Mono] GC_OLD_BRIDGE num-objects 26 num_hash_entries 32 sccs size 32 init 0.00ms df1 0.35ms sort 0.01ms dfs2 2.00ms setup-cb 0.01ms free-data 0.70ms links 0/0/0/0 dfs passes 0/0
[Mono] GC_MINOR: (Nursery full) pause 51.88ms, total 59.63ms, bridge 0.55ms promoted 0K major 21248K los 8K

I realize I'm probably going about this the wrong way, and could use some advice in how to accomplish my goal of saving the current page navigation stack when the app is backgrounded/killed by OS/resumed.


Viewing all articles
Browse latest Browse all 89864

Trending Articles