Microsoft teaches developers the best way to share local app data

Microsoft has continued their blog series aimed at educating app developers in how to make the best Universal Windows Platform app possible for Windows 10 devices.

In a previous blog post, they introduced the concept of saving app data locally but in this latest one, they discuss how to share data between different apps and users.

Microsoft’s Hector Barbera explains, “When an app is installed, the system creates a per-user app data container on the device. This app data container is within the app sandbox, which means no other app or user will be able to access it. Fortunately, the Universal Windows Platform provides mechanisms to get around the sandbox if the scenario requires it.”

One of these new mechanisms is the new Publisher Cache feature which allows apps made by the same publisher to share data within the same central system. Another method can also be used to share data. “We introduced a new storage location Windows 10, ApplicationData.SharedLocalFolder, that allows multiple users of one app to share local data,” says Barbera. “Obviously this feature is only interesting with devices that will be used by more than one person. For such scenarios, for example in educational uses, it may make sense to place any large downloads in Shared Local. The benefits will be two-fold: any user can access these files without the need to re-download them, also there will be storage space savings.”

The post supplies sample code for those that really want to get into the nitty gritty of app development and the series as a whole is definitely worth following for anyone curious about the way apps are made and, in particular, how the new Universal Windows Platform app format is changing the way apps are developed for Windows 10 PCs, Windows Phones, Xbox One, and even Microsoft’s HoloLens.

Share This
Further reading: , , , ,

Have you ever tried to develop an app for Windows?