简体   繁体   中英

Phone App doesn't stay in navigation stack on phone, but does when connected to VS via USB

My Phone App doesn't stay in the navigation stack on phone, but does when connected to Visual Studio via USB. When I run it 'to Device' from Visual Studio, I can go to another app and return to my app (which is still in the state I left it) - but when I run it on the phone by itself it closes when I go to another app and come back (via back button). I have a Lumia 928. (Universal app 8.1) Anybody else run across this behavior? Any thoughts on what I might be missing. It navigates fine forward and backwards within my app, and when run as a Device from VS, but not alone.

I was trying to serialize an object that serialization doesn't support. I trapped for that error and now the app behaves properly.

This link helped https://social.msdn.microsoft.com/Forums/en-US/3e24c556-3758-40d0-bd03-55e193538340/getnavigationstate-doesnt-support-serialization-of-a-parameter-type-which-was-passed-to?forum=winappswithcsharp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM