Good grief, it's been a while....
Ok, my first new post in ages should be something interesting, noteworthy, possibly controversial, so I shall choose: my new phone!
Maybe not the *most* fascinating subject, but there are a couple of things that it's probably worth posting about. First off, it's an HTC Touch, and I think it's great. From the review I've seen there seems to be disappointment that the processor isn't faster, and there are times when it could certainly do with a bit more speed, but it's a huge improvement over my last handset, and seems perfectly happy most of the time. The only problem I've had so far is with City Time Alarms, which was my preferred alarm program on my old handset. Unfortunately, on the Touch when this program is installed it throws a whole bunch of errors on startup, and generally misbehaves. I've contacted the authors about this, and with any luck they'll come up with a fix.
The main point of this post is the weather. To be specific, the weather module in the Touch. You select your city from the list, and it runs off to the web to find your weather report. Very nice, useful, and even rather pretty. However, since the default list for the UK appears to contain Edinburgh, London, Manchester and Plymouth, and not a whole lot else, it's of limited use.
Now, the list of cities is kept in the HH_0409_WeatherCities.xml file, located in the Windows directory on the phone. To add new cities we must edit this file. However, it appears to be a read-only system file, and the built-in File Explorer won't let you edit it. However, the Pocket version of Total Commander will, so that's what I'm using. To add a city, you need to insert a line like this:
<city locationcode="EUR|UK|UK001|READING" name="Reading, England"/>
The next question is where to find city details - you can't just put in the name of any town and expect it to work. A little digging on the web told me that AccuWeather was the source of the weather information, and a look at that site shows that there is a pre-set list of cities for different countries. Go to the AccuWeather site, and use the "Find your local forecast" feature and you can see which cities are available. A bit of "view source" and we can see that the list of cities is populated by an ASP page (change the reqion and country to suit yourself): http://www.accuweather.com/includes/ajax-functions/favoriteCities.asp?region=EUR&country=UK
Ok, so now we have a list of cities for our country. We now need to get them in the correct format. The AccuWeather feed looks like this:
<cities>
<city code="EUR|UK|UK002|ABERDEEN" display="ABERDEEN, SCOTLAND"/>
<city code="EUR|UK|UK001|ASHFIELD" display="ASHFIELD, ENGLAND"/>
<city code="EUR|UK|UK001|BARNET" display="BARNET, ENGLAND"/>
<city code="EUR|UK|UK001|BARNSLEY" display="BARNSLEY, ENGLAND"/>
<cities>
and we need this:
<locations>
<city locationcode="EUR|UK|UK002|ABERDEEN" name="Aberdeen, Scotland"/>
<city locationcode="EUR|UK|UK001|ASHFIELD" name="Ashfield, England"/>
<city locationcode="EUR|UK|UK001|BARNET" name="Barnet, England"/>
<city locationcode="EUR|UK|UK001|BARNSLEY" name="Barnsley, England"/>
</locations>
A bit of search and replace should do the trick! I now copied this file, HH_0409_UK_Cities.xml (8.86 KB) , to my Touch, made a backup of the original list (HH_0409_WeatherCities.xml (24.62 KB)), and replaced the original list of cities with my list of UK cities. Done!
Note to self: try and remember to blog a little more often!