Roaming Settings In Windows Universal Apps

In this article, you will learn about roaming settings in Windows Universal apps.

Here, are some key points which needs to be kept in mind while implementing roaming settings in your app.

  1. Roaming settings are required to store a user's settings and preferences, and session info can be available across multiple devices.

  2. Roaming data is associated with a user's Microsoft account and only synchronizes if a user logs into his devices, using the same Microsoft account and installs the app on the several devices.

  3. Some kind of files, which don't roam are:

    • File types that behave like folders (for example, files with the .zip and .cab extensions).
    • Files that have the names with the leading spaces.
    • Files that have names with these unicode characters:
    • e794, e795, e796, e7c7, e816, e817, e818, e81e, e826, e82b, e82c, e831, e832, e83b, e843, e854, e855, e864, e7e2, e7e3, and e7f3
    • File paths (file name + extension), which are longer than 256 characters.
    • Empty folders.
    • Files with the open handles.

  4. Handle the DataChanged event by updating the app data. This event occurs, when the app data has just finished synchronizing from the Cloud and the event only fires if the Application is active.

  5. Roaming settings are exposed as a dictionary in which an Application can save the data.

    code

  6. On Windows desktop, there is special High Priority Key. There is no effect on Windows mobile.

  7. There's a limit to the amount of the app data as an app may roam; use RoamingStorageQuota property.

  8. Debugging : Developer can install the Application on the multiple unlocked devices. Locking a developer device will trigger the synchronization. If a problem occurs, make sure the file is closed properly. Make sure the devices can run the same version of the app.

  9. Tips: Good for app customization settings, most recent activity, and partially completed work. Synchronization stops, if roaming data >100kb. It's bad for synchronizing large data or "instant syncing" scenarios. Data is deleted from Cloud if app is not used for a period of time (~30 days).