gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-30 01:19:06 25 4
gpt4 key购买 nike

我已经按照这里的示例在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com