Posts on May 8, 2012
a little down, with music to bring me up
Posted on 2012-05-08 10:05:00
Tags: gay politics links
Sigh. The past few weeks have been pretty rough in terms of stress and things going on. North Carolina votes today and the ban on same-sex marriage and civil unions seems likely to pass. I am tired.
To cheer me up, I found this awesome a capella cover of "Somebody That I Used to Know" by Pentatonix. Then Adam pointed me to this cover by Walk off the Earth where they only use one guitar, followed by a pretty good parody of said video.
Windows 8 Metro background task restrictions are way too strict (even versus Windows Phone 7!)
Posted on 2012-05-08 13:43:00
Tags: windows rant essay windowsphone programming
Edit: See the followup post on why this isn't a big deal, and the right way to do updating live tiles in Windows 8 Metro.
I've been working on porting FlightPredictor to the shininess of Windows 8 Metro. One of the key features of FlightPredictor is the ability to pin a live tile for a flight, and have that live tile update periodically in the background.
On Windows Phone 7, there are a lot of restrictions on background agents like the one in FlightPredictor that updates the live tiles. The agent can't run more frequently than every 30 minutes (and when it actually gets called is not that regular), if it runs longer than 25 seconds it gets killed, and most importantly there's a limit to how many you can have active on the phone - Microsoft says phones must allow 6, but my Lumia 900 allows a maximum of 9. I've actually hit this limit, because live tiles that are always up to date are cool.
So, I've started to work on this for Windows 8 Metro, and I found this whitepaper about Metro background tasks. There are a bunch of new ways to trigger running tasks (when you have internet access, for example, or when a user logs in), but you can also trigger them every 15 minutes, which is nice. There are also CPU requirements (now they're measured in CPU-seconds instead of wall time that the task runs) as I would expect.
Unfortunately, you can't use the TimeTrigger unless you display information on the lock screen. This requires extra user permission, which is OK enough, I guess. I wasn't planning on looking into showing flight info on the lock screen, but if that's necessary for my app to work the way I want it to I'm fine with that.
But here's the kicker: a user can only have seven apps show information on the lock screen. And three of these (Mail, Calendar, Messaging) are builtin! So this leaves four slots for apps to run based on a TimeTrigger in the background.
Now for the rant-y part: this is crazy. I have a bunch of apps that run in the background on my phone - as I said, having auto-updating live tiles is one of my favorite features of Windows Phone. To drastically cut the number of apps that can do this on an OS that's designed for a tablet (so presumably better battery life, etc. than on a phone) is way too strict and a step backwards.
It is possible I've missed something here, and I'd love to hear feedback on it. This is just a policy decision - what I would really like is the ability to run based on a TimeTrigger even if my app isn't on the lock screen, with reasonable limits.
Addendum: one way around the limit on Windows Phone 7 is to use push notifications - then your app doesn't have to run in the background and doesn't count against the limit. But it looks to me from reading the Metro whitepaper is that even apps that want to run based on a push notification have to be on the lock screen. Or is there a way to use a push notification to update a tile without having an app run? I'm not sure...
This backup was done by LJBackup.