views:

66

answers:

1

On a Windows desktop system settings should be saved in the AppData folder for many reasons, including write access without being admin and the possibility to have different settings for different users. But what is the recommended way for Windows Mobile (.NET CF) applications?

As far as I know there is just one user, so that argument doesn’t apply. You also get a choice during installation to pick either the SD card or the device, and I guess you’d expect most of the files in the place you choose?

My app contains the following types of files:

  • Skins (users can add their own, ~200KB/skin)
  • Voices (users can add their own, ~1MB/voice)
  • Log files (small to large in size, depending on logging level)
  • XML files where I store the actual data and settings generated by my application.

Which of the above should go into application data and why?

+1  A: 

Most of the files listed above can be stored in the same folder as the application exeutable themselves. As you've pointed out there's no admin account on a Windows Mobile device. Part of the reason for the organization of these files on the desktop is to maintain clean seperation of user settings. Since Windows Mobile devices are designed with a single user in mind there are not such facilities to seperate users. If these were files that were intended to be opened directly by the user (like a word document) then at that point I would suggest storing them in the My Documents folder.

The one file over which I have concern is the log files. You mention they can get large in size. These can also be in the application folder but if they can get large in size you will need to be able to react to the devices storage space getting low (by clearing part of the logs).

Joel