Categories
android

Getting album covers working on the HTC Hero

I’ve been strugling getting album art working properly with the music player included on the HTC Hero. Covers was only working for some albums. After a bit of googling and a few different tries, since there was a lot of misinformation on google about this problem, I finally figured out how it works. The player reads covers from a tag on the files. This is apparently the only way it supports covers. The player after reading a new cover, then thumnails them and stores the thumb in the albumart directory on the flash. The first application that I tried to add the album art to the files was Easytag, sadly it has a pretty nasty bugs that leads all the covers all fucked up. That combined with the caching of the player, left me strugling trying to correct the covers after I found a tagger that actually worked. So please don’t try that at home 🙂 My second try was Kyamo, which I can’t recommend sadly. There are simply too many things that sucks in it. Things that combined makes fixing up ~10gb music a complete pain in the ass. I finally settled with Mp3tag, it’s for Windows, but at least it works quite well and its free (as in beer). Another annoying thing about the player is that, while it supports Ogg Vorbis, it doesn’t understand covers embedded in ogg. So no cover for those albums. Ah yeah, I should probably also mention that the thumbs generated are in 320×320, so in my experience around 500×500 pixels works best.

Hopefully this should help others, who have been struggling with figuring out how the hell the music player on the HTC Hero handles covers.

Categories
profiling

Profiling multithreading applications

I’ve written about profiling before in the general case. But when it comes to multithreading, there are a few more factors to consider such as lock contention and cache invalidation that affect performance. And this is where mutrace (mutex profiler) comes into the picture. The profiler has a very low overhead compared (no perceived delay for me) to other solutions and gives quite nice results. I tested it on My Media System (C++) and Nemo (C#) and got interesting results for both. I knew more or less what the results for mms would be, but the results for Nemo was a bit suprising. The lock contention was significantly higher than for mms, even though I didn’t really use a multithreaded design for Nemo. So I guess it comes from the mono platform itself. Sadly it seems that mono programs aren’t compiled with -rdynamic, so the results that one gets are quite hard to decipher.

Categories
android

Andnav2, open maps for the android

As I was researching the android platform before buying a HTC Hero, one of the things that really got me excited was the mappping/gps application andnav2. It’s a frontend for openstreetmap, that uses the open routing service to provide turn-by-turn, all for free. The only thing is that it requires is a internet connection for routing, but it’s not really a problem as a route is only a few kilobytes. Maps can be preloaded onto the device also, for situations where one doesn’t have an internet connection available (like when traveling). I used the nice TrekBuddy atlas creater application to fill the device with maps of all of Denmark, London, Berlin and Europe at a decent level.

I was really impressed by the openstreetmap when I was in Corsica earlier this month. I had preloaded maps onto the device before going and it really served us well as the rented car didn’t have a GPS, and my other GPS of course didn’t have maps for Corsica. This was using the excellent maemo mapper and the Nokia N810, but it should be the same with the android.

The user interface of andnav2 could use a lot of cleaning. It’s not very user-friendly, but it will hopefully improve. As the coverage of openstreetmap improves, it will be harder and harder for companies like Tom Tom to ask 750kr for their mapping application like on the iPhone.

Also as the search interface in android marked sucks hard (of the irony Google), one needs to enter andnav2 and not andnav, as that will only show the older version.

Happy mapping!

Edit: The author released a new version, that only works on android > 1.6 (because of TTS), and appears to not really care about older versions of Android. I have approached him multiple times asking for him to fix it, sadly he’s been playing the silent ninja. Just making the old binary available would be fine, but sadly no. Since the source is not available there isn’t much we can do except wait for HTC to release the 2.0.

Edit2: Working version available here: http://people.iola.dk/arj/2009/11/25/andnav2-working-on-hero-again/

Categories
android

Fixing the HTC Hero Sync installer for non-english versions of Windows

I recently aquired a HTC Hero phone. More on that later. First I just wanted to help out other poor souls out there, who are forced to use Windows to upgrade the software on the phone. There is a bug in the installer for the HTC Sync program which leads to the drivers not being installed, in turn resulting in the inability for the computer to find the android device. Very frustrating to the say the least. The installer writes the driver to the localized program files directory (on a Danish version of Windows this is C:\Programmer), but looks for it at the hard-coded path C:\Program Files, resulting in the drivers not being installed. Fixing the problem is pretty easy:

  1. Copy the HTC directory from C:\Programmer to C:\Program Files (you might need to create this first)
  2. uninstall the HTC Sync application and the HTC drivers
  3. Reinstall the HTC Sync application

After that you should be able to upgrade the phone to the much improved new firmware.

Happy phoning 🙂