programming: checking that downloaded maps are up-to-date
Mood: thoughtful
Posted on 2012-03-27 15:18:00
Tags: projects programming
Words: 531

I came across an interesting problem when working on FlightPredictor for Windows Phone: ensuring that downloaded airport maps are up-to-date.

This is the first time I've had to deal with this problem when porting FlightPredictor:

But neither of these options were viable for WP7 - there are limits on app sizes (if I included all the maps, it could only be downloaded over WiFi), and there's no Content Provider-type mechanism. So I decided to let the app download the maps from inside the app itself, if the user chooses to do so.

This created a new problem: how could I tell when new maps were available? Here were my criteria:
So, here's what I came up with:
And my process for updating maps is to publish them to S3 first, then submit a new version of the app with a new maps index hash. If old users manage to get the new version of the maps, no problem - they won't report as out of date (since the hash won't match anything), and when they get the new version of the app they won't report as out of date either.

1 comment

This backup was done by LJBackup.