Jarrette
Jarrette

Reputation: 1095

Windows Phone 7, can I pass a parameter to ScheduledTaskAgent for a live tiles update?

Is there any way to pass a string from the main app to my live tiles agent assembly? There is a user preference I need to pass to the service so the service knows what to query a web service for....

Upvotes: 0

Views: 621

Answers (1)

Matt Lacey
Matt Lacey

Reputation: 65564

You can communicate from an app to an agent via Isolated Storage.

However, beware of both the app and the agent running at the same time as they cannot both access the same instance of IsolatedStorageSettings at the same time and you should be sure to lock the use of files appropriately if using them instead.

The safest way to communicate in this way (if appropriate to the app) is to write the information the agent needs before it is started. This way you can be sure to avoid any conflicts of access.

Upvotes: 1

Related Questions