[This is part of the Android Diary.] I’d had an unofficial goal that the little Android goober I’m working on should be demo-able by the end of 2008. I made it by half an hour. It draws clickable zoomable renditions of geotagged feeds (RSS or Atom) on Google maps. The look and feel are cool. As of now, I’m not actually sure it’s useful for anything, but I think that geotagged feeds are potentially very interesting in general, so a viewer couldn’t hurt. The short-term lessons are about Android, though.

Here’s what it looks like. First, you enter the URI of a geotagged feed (the usability is lousy here and Android isn’t helping, I’ll write more about that in another note).

FeedMapper, choosing a feed URI.

Here’s the map. The most recent entries are red, then they fade to blue as they get older. I should really figure out how to do a screencast, because while the map looks OK, what’s really elegant is how everything is live and responsive; you can nudge the map around, or use the built-in zoomer to move in and out, and the feed display updates itself. And of course, if you jab at one of the entries, it opens the linked Web page in the phone’s browser. (And then the excellent “Back” button takes you back to FeedMapper.)

FeedMapper displaying a geotagged Atom feed

Another nice thing is that since FeedMapper is an Android “Activity”, if you’ve got the app on your phone, you can easily launch it from another app in a nice smoothly-integrated way; and you can go straight to the map if you know the URI of the feed you want to map.

Now, on to the lesson, which is more interesting than the app.

Android Is Impressive · Background: I’m a decent Java programmer but not a superstar; haven’t buckled down seriously in five years or so. I’d never seen the Android-specific APIs before. The last time I worked on a non-Web UI it was in (gasp!) Motif, almost twenty years ago.

What does the app have to do?

  1. Provide a space to type in a URI.

  2. Fetch the feed over the Web.

  3. Parse the XML.

  4. Pull out titles, links, and any geotagging data.

  5. Figure out how big the map has to be to include the points on the feed, and display it.

  6. Decorate the map with a graphical rendition of the geotagged feed entries (currently just differently-shaded circles and curved lines connecting them).

  7. Handle map-touch events and when the touch is near enough to an entry, launch a browser to display the linked Web page.

  8. (There’s no error-handling to speak of yet.)

Consider, then, that I put this together between the 18th and 31st of December while doing some Sun work, celebrating the holidays, traveling to Regina and the in-laws’ farm in Saskatchewan, and doing a lot of child-care, with 800-and-change lines of Java code and another 75 of XML config goo.

What Makes It Work? · The community. The reference documentation is OK for JavaDocs but the tutorial pieces are very patchy, and there are lots of gotchas and ways to fail silently with no diagnostics.

Which turns out not to matter. When you hit a problem (and you will hit problems), in a high proportion of cases a Web search will turn up someone who’s already had it and solved it, usually with working code included.

Next Steps · As I said, I have no idea whether a viewer for geotagged feeds is interesting. (A viewer for multiple feeds at once would be more interesting, clearly.) The project has accomplished its goal for me: I’m now fairly up-to-date on the Android programming environment and community. If there turns out to be some actual interest I have nothing in principle against doing some further polishing and releasing it, but that would be real work, so I’d need a few good reasons.

Buttonhole me at a party or a conference though, and I’ll cheerfully demo.



Contributions

Comment feed for ongoing:Comments feed

From: Don Park (Jan 02 2009, at 15:23)

are you publishing the source code? i have written a similar but somewhat more specialized android application called icecondor.com.

[link]

From: James Bayer (Jan 05 2009, at 08:45)

There is a very nice new Web2.0 startup for doing screen recordings. It even uses Java. Techcrunch put me on to them:

http://www.screentoaster.com/

[link]

From: dret (Jan 05 2009, at 11:17)

this looks really nice, in paricular given the amount of effort involved to get to this point. what i find interesting is how much harder this would have been on an iPhone, because there is no built-in SDK support for building map-based apps. that was one of the big surprises of the iPhone SDK: how can anybody release an SDK for a mobile platform with GPS and a great screen without providing map support in the SDK?

[link]

author · Dad
colophon · rights

January 01, 2009
· Technology (90 fragments)
· · Java (123 more)
· · Mobile (86 more)

By .

The opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.

I’m on Mastodon!