You can save settings in your app and have them accessible by your background agent by saving a file to IsolatedStorage. I use JSON.Net to save and read the file. I always save my settings in the .\Shared\ of my storage. This way I know I can always access it. I have created a class for storing and reading this information called FileStorage. Using this class you can save your settings quite easily. I will create a Save, and Load method in my settings so they can be read and updated with the current information.
public class AppSettings
{
public bool SomeProp { get; set; }
public double AnotherProp { get; set;}
public void Save()
{
FileStorage.WriteSharedData("Settings.txt", this);
}
public static AppSettings Load()
{
return FileStorage.ReadSharedData<AppSettings>("Settings.txt");
}
}
This class helps ensure that I can access the file and my settings without any issue.
I have had success when using IsolatedStorageSettings for my app and for my background agent. I only use IsolatedStorageSettings if memory is a concern as my other solution uses JSON.Net which consumes quite a bit of memory.