I'm new to WP8.1 developing so this might be a newbie question: I'm writing an app that have some settings, so i'm using these APIs:
var applicationData = Windows.Storage.ApplicationData.current; var localSettings = applicationData.localSettings;
As i can see from emulator everything works well if i save a value and then get it out later, even if i close the application with task manager (holding the back button of the emulator): if I run the app again it has the correct values saved. But if I shut down the emulator and re-launch the app from Visual Studio it starts with default values.
Is it because the emulator is freshly created every time and my app installed every single time or something is wrong with my ApplicationData usage? I mean: if I use a true phone with these settings (don't have one now) will the customized settings saved even if i turn off the phone? Or I have to use some more "deep" API to permanently save an application setting?
Thank you for your help!
According to this link http://sviluppomobile.blogspot.com/2013/01/saving-windows-phone-8-emulator-state.html, yes, Windows Phone emulator does not save its state, so every time you start the emulator, you get a "new" fresh system as if you turned on a real phone for the first time.
On the other hand, when you use a real device then the state will be preserved and you will not loose your data when you restart the phone.