c# - Windows Phone 8.1 如何永久删除漫游设置?

标签 c# store windows-phone-8.1 application-data

我已经按照这里的示例在 ApplicationData.Current.RoamingSettings 中存储了一些数据 http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh700362.aspx . 问题是,将数据存储在 RoamingSettings 中,然后使用 ApplicationData.Current.RoamingSettings.Values.Remove(key) 删除相同的数据(我已经检查过,实际上数据已经不存在了),如果我在我的手机上卸载并重新安装该应用程序,我删除的数据将返回到 RoamingSettings 中...

我也尝试过 ApplicationData.Current.ClearAsync() 清除所有内容,但在卸载并重新安装应用程序后同样如此。数据又回来了。

有什么建议吗?

最佳答案

RoamingSettings被设计成那样工作。它们可用于存储设备之间的设置。从所有设备上卸载应用程序后,设置会在云端保留一段时间,以防用户再次安装应用程序。如果您只想使用本地数据 - 请查看 LocalSettings .

您将找到有关 Guidlines for Roaming Data here at MSDN 的更多信息.

here at the blog你会发现类似的答案:

Q. What happens to roaming app data when an app is uninstalled?

A. As noted in the previous question, an app’s app data folders are removed from a device when the app is uninstalled. Roaming app data, however, persists in the cloud so long as the user has the same app installed on other devices. When the user uninstalls the app from all of his or her devices, roaming app data continues to persist in the cloud for a reasonable time (a matter of a few weeks) so that it’s still available if the user decides to reinstall the app within that time. Note that when you make a change to an app project in Microsoft Visual Studio and that change (such as changing the manifest) forces a full reinstall, app data is removed as part of the process. References: Guidelines for roaming app data(overview docs).

因此,要永久删除您的RoamingSettings,您将不得不等待。

编辑 - 感谢Pablo我们有更详细的资料here at MSDN :

Roaming data for an app is available in the cloud as long as it is accessed by the user from some device within the required time interval. If the user does not run an app for longer than this time interval, its roaming data is removed from the cloud. If a user uninstalls an app, its roaming data isn't automatically removed from the cloud, it's preserved. If the user reinstalls the app within the time interval, the roaming data is synchronized from the cloud. The current policy specifies that this time interval is 30 days.

关于c# - Windows Phone 8.1 如何永久删除漫游设置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24371087/

相关文章:

c# - 光标位置函数返回错误值

c# - 如何获取 WatiN 图像元素的位图?

java - 如何在服务器上存储临时数据并共享给许多用户

java - 如何查找特定项目的存储位置 | eclipse

xaml - StackPanel 在 Windows Phone 8.1 中不滚动

c# - 几何对象的可视化调试器

c# - WebRequest 的 GetResponseAsync 不稳定,而 GetResponse 则不是

c++ - 如何在同一列表中存储指向任意类类型的方法指针?

c# - 如何在 Windows Phone 8.1 中设置支持的方向属性

c# - 为运行时应用程序创建 SIlverlight 包装器类