Tuesday 2 August 2016

Short Notes on Roaming Settings in Windows Universal Apps

Hello All,

Here are some key points which keep in mind while implementing roaming settings in your app.

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

2)Roaming data is associated with a user's Microsoft account and only sync if a user logs into his devices using the same Microsoft account and
 installs the app on 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 names with 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) that are longer than 256 characters
  • Empty folders
  • Files with open handles
4)Handle the DataChanged event by updating app data. This event occurs when app data has just finished syncing from the cloud and event only fires if the application is active.

5)Roaming settings are exposed as an dictionary in which application can save data.

       

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 app data an app may roam; use RoamingStorageQuota property to get this maximum.

8)Debugging : 
Developer can install application on multiple unlocked devices.
Locking a developer device will trigger the synchronization.
If problem occur--make sure file closed properly,make sure devices can running same version of app.

9)Tips:
Good for app customisation settings,most recent activity,partially completed work.
Synchronisation stops if roaming data >100kb
Bad for syncing large data or "instant syncing" scenarios.
Last writer wins.
Data deleted from cloud if app not used for period of time(~30 days)

No comments:

Post a Comment