Todd 的个人资料Tales of a Gadget Develo...照片日志列表 工具 帮助
9月23日

Sidebar gadgets and resuming from sleep

In the process of updating my Soapbox sidebar gadget, I ran into a little problem with timers and resuming from sleep.  I had a timer setup to make a network call every 30 minutes, but upon resume the network call would fail and the timer would not be reset into its proper failure state (on failure, the timer switches to 2.5 minute updates, in case your network connection comes back).  After poking around for a bit, I found that if I listened for System.Gadget.visibilityChanging to stop and restart the timers, everything started working correctly.  Just wanted to share that bit of info in case others are having the same problem.