开发者

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

开发者 https://www.devze.com 2023-04-04 12:29 出处:网络
Is there any way to pass a string fr开发者_JAVA技巧om 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 ser

Is there any way to pass a string fr开发者_JAVA技巧om 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....


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消