在WinRT应用程序的多个用户之间共享数据 [英] Share data among multiple users of a WinRT app

查看:527
本文介绍了在WinRT应用程序的多个用户之间共享数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们developped一个Windows商店应用(Windows 8中),从互联网获取文件并将它们存储在本地,使他们可脱机使用。您可以将其视为应用程序定期进行的单向同步。问题是文件的量是巨大的(大约500Mb),并且应用程序可以由不同的用户在同一设备上使用。

We developped a Windows Store app (Windows 8) that gets files from the internet and stores them locally to make them available offline. You can think of it as a one-way synchronization that the app does on a regular basis. The problem is the amount of files is huge (around 500Mb) and the application can be used by different users on the same device.

由于应用程序在其LocalFolder写入同步文件( ApplicationData.Current.LocalFolder ),并作为这个位置是不是amoung用户共享,每个用户同步时重复相同的500MB的文件。

As the app writes the synchronized files in its LocalFolder (ApplicationData.Current.LocalFolder), and as this location is not shared amoung users, each user duplicates the same 500Mb files when synchronizing.

有没有这些文件存储在设备上,这样应用程序可以使用它们的方式谁要同步它们吗?

Is there a way to store those files on the device so that the app can use them whoever synchronized them?

请注意,我们不需要在应用程序外浏览这些文件。

Note that we don’t need those files to be browsable outside of the app.

推荐答案

下面是位置列表,你可以从Windows Store应用访问:的 Windows应用商店应用中的文件访问权限。没有文件夹像共享位置。您可以尝试强制用户将文件保存到与FileSavePicker共享位置,但是你将失去这个文件为您的应用程序(您的应用程序将不会看到这个文件,如果用户将其保存在个人文件夹)。

Here is the list of locations, that you can access from Windows Store App: File access and permissions in Windows Store apps. There is no folders like shared location. You can try to force the user to save files to the shared location with FileSavePicker, however you'll lose this file for your app (your app won't see this file if the user will save it in the personal folder).

这篇关于在WinRT应用程序的多个用户之间共享数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆