Wednesday, July 7, 2010

Android App Surgery: "Earthquake!"


This week, rather than put someone else under the microscope, I'm going to do an Android App Surgeryon one of my own apps: Earthquake!

I hope you'll excuse the indulgence, the distinct advantage of  reviewing my own application is that I can find and point out some of the things I should be doing differently that are harder to spot without access to the code.

In an effort to see if I practice what I preach, I'll evaluate my own app according to the criteria I set out in my Google I/O presentation on Android best practices.

The App: Earthquake!

Earthquake is a reference app that uses the USGS 24hr earthquake feed to keep users informed of recent earthquakes.

Like most apps based on a data feed, the UI is centered around a ListView. The main screen is a vertically scrolling list of recent earthquakes each displaying their magnitude, times, and locations. This is enhanced by a map that displays each earthquake's location and which uses shaded circles to indicate the area likely to be affected by each quake.



Sloth and Gluttony

First the good news. All non-trivial processing is done using ASyncTasks. There are no modal "loading..." dialogs, but incremental refreshes are indicated using the default indeterminate progress indicator. Changes to the quake list are handled dynamically at runtime with the list updated with new data as it's acquired.

The earthquake feed lookup and parsing is handled within a background Service that kills itself on completion.

On the flip side, the Service uses the pre-2.0 onStart method rather than onStartCommand (here's how to support both). Because of this the Service will restart as soon as sufficient resources become available. Instead, onStartCommand should return START_NOT_STICKY, knowing that the Service will be restarted within a reasonable period of time.

Updates are handled via regular background polling - with battery impact minimized through setInexactRepeating. There is scope for using C2DM to replace this polling approach with an event driven update approach.

Hostility and Arrogance

I know several of the engineers working on the Android framework; it didn't take long to decide that second guessing their decisions was likely to have a low ROI. Similarly, watching my friends suggested that some people actually use their phones for making calls and sending SMS message (who knew?!) .

In an effort to make this app seem as native as possible and allow the system to manage as much as possible it:
  • Uses the dialog mechanism to display dialogs.
  • Application preferences are handled using Preference Screens.
  • System icons are used (where possible) for menu items.
  • The back button behaves consistently and inline with user expectations.
That said, there are a couple of areas that annoy me as a user:
Discrimination

Arguably this app's biggest sin.

The manifest doesn't declare a target SDK, nor does it explicitly declare which screen sizes are supported. As a result it's unavailable to users of small screens (such as HTC Wildfire and Sony Ericsson X10 mini/pro users). Worse, it doesn't include assets for low or high resolution displays.

There's no internationalization support, which isn't great, what's worse is that I've gotten lazy withexternalizing the strings. About half are defined in XML, the rest are string literals. There's no excuse for that.

The manifest doesn't declare which hardware features are mandatory, or which are used but optional. It uses (but doesn't require) both Location-based services and the vibrator, so to ensure it's available on the largest subset of devices both should be specified as optional in uses-feature nodes.

Beauty and User Experience

I am not a designer. If I were serious about turning this app into something I could charge for, I'd do well to seek out someone with skillz.

Even so, there's some simple improvements that would help:
  • The map is probably its most appealing aspect so it makes sense to make this more obvious. ATab Layout might be a better option, together with the ability to horizontally swipe between views similar to the Calendar or News and Weather apps.
  • The list view lacks "sparkle" - replacing the standard header bar with something that includes the logo might improve this, as would a dynamic background for each quake. A LevelListDrawablethat adjusts the background based on  the magnitude of each quake would be simple to achieve.
  • Long-pressing earthquakes should display a context menu that provides a wider range of alternative actions: such as viewing quake details (via a dialog or USGS.com), sharing a quake, or 'pinning' it to prevent it from being removed when it falls out of the 24 hour feed.
  • The map display has some unnecessary padding around the edges, and the quality of the map markers needs to be improved. Clicking on a quake marker should display an info window with actions (show details, etc.).
Generosity and Ubiquity

The app includes a Widget and a Live Folder for the home-screen, and it uses Notifications to announce new quakes. Search integration is missing though. Given that the quakes are stored in a Content Provider, it would be relatively simple to include it, both within the app and surfaced to the Quick Search Box.

It's worth considering using the send intent to let users share quake details with friends using other apps like email, SMS, Twitter, Facebook, etc.

Similarly, Earthquake doesn't expose and data or Intent Receivers, nor does it leverage Intents available from other apps. It might be worth exposing an Intent Receiver to allow other apps to show the earthquakes at a given location, or even plot the size of an earthquake on the map.

Utility

The utility of this app is likely to be in direct proportion with your distance from a significant fault line. If knowing when and where earthquake strike is useful to you, then so is this app.

Epicness

Epic is a high bar to aspire to, it's fair to say that this app does not reach such lofty heights.

Imagine your app was written by a competitor - what would you do to steal their users?

App developers take note: the easiest way to improve your app is to apply a critical and objective eye to it. I'm going to leave Earthquake as it is for a couple of weeks so that you can evaluate the app based on this review. I'll then look to implement the improvements I've suggested here.

maps of world

maps of world : Maps of every place of tourism and sports in the world

The Victorian Bushfires on Google Maps


The bushfires of 7 February 2009 were the worst in Australia's history. The Australian Broadcasting Corporation has created an amazing Google Map to tell the stories of the Victorian bushfires by those that actually experienced it.

ABC has collected hundreds of accounts of the day and the fire's aftermath from residents of the fire-affected communities, volunteer fire fighters, journalists, politicians, tourists and others. This Google Map allows users to browse these stories, videos and photographs by location and by time.

The timeline allows you to browse the submitted stories on the map by time. The initial view allows you to select any range of time from the 7th and 8th Feb 2009. If you select the next button you can also select a time range from the days, weeks and months after the fires.

All the multi-media content can be viewed directly from selecting the markers shown on the map.

links for 2010-07-07



  • Interesting article explains how a slew of new satellites is keeping better tabs on polar ice.

  • Loopt now lets you download a KML file containing your 30-day location history. Which is great. Not so great is that Loopt is unavailable outside the US. For a location-based company, that's a bit unfortunate, no?

  • "Zoom in on your roof" is an interactive map provided by the city of Antwerp that lets you check the efficiency of your roof insulation. It's a wonderful neogeographical innovation, well executed, addictive and easy to use -- even if you don't speak Flemish:-)

  • At one point, Kurt writes: "It's too bad that in Google Earth, you can't put a GeoRSS in a Network Link." Yes it is.

  • Tuesday, July 6, 2010

    Australian Art Projects on Google Maps





    The Australia Council for the Arts is currently funding nearly 200 companies in Australia. Arts on the Map provides a Google Maps and Google Earth browser plug-in portal to explore the different projects.


    To explore the map you first select the type of art project you wish to explore and then the region of Australia that you are interested in. The relevant art projects for your search are displayed on the map with red kangaroo map markers.

    An innovative feature of the map is the 'tour' feature. If you select the tour option the map will animate through your search results one by one.

    Realtime Underground Feed Released Then Removed


    Sometimes there’s just too much interest in open data. The Greater London Authority has temporarily pulled its feed of the Underground due to “overwhelming demand.” The service gave locations of every subway train in the city updating in nearly realtime.
    Developer Matthew Somerville used the service to create a fascinating live map of trains. The site is not currently updating, but the video below shows a working version.
    The Greater London Authority seems optimistic about the feed returning:
    We hope to restore the service as soon as possible but this may take some days. We will keep everyone informed of progress towards a resolution.
    And that’s a good sign, because this is the sort of useful data that should be opened up. While the live map was working, it gained significant attention, including this high praise from Softpedia:
    In the not so distant future, every electronic gadget or appliance, every ‘thing,’ is going to be connected to the web, pouring massive amounts of data into the system. Already, some of the things that are connected would surprise you, like the London Underground trains… it’s a very good way of showing what’s possible when the web and the ever increasing computerized systems running the world’s infrastructure come together.
    CenterNetworks pointed to other realtime transit examples. We have also covered public transportation before: we interviewed one developer trying to get data from agencies and profiled 4 Hip Transit Authorities with APIs.
    Hat tip: Josh Heumann

    Toronto Google Maps Mashup Round-up


    This week's Toronto Star Google Maps mashup is a map that shows car ownership in the Greater Toronto Area (although the title of the map, 'GTA Car Ownership Map', did make me wonder if it was a map of people who owned stolen cars).

    The map is a heat map of car ownership as a percentage of households, using data from the 2006 census. The Map of the Week blog has an interesting analysis of the data. The analysis show a correlation between car ownership and income. The map also show some correlation between good public transportation links and low car ownership.

    Rent Compass can help you find properties to rent in Toronto and other Canadian cities.

    You can search for properties by price, property type and by location. The results of your search are handily displayed on a Google Map. The map uses different map markers to show whether the properties are houses for rent or apartments.

    If you click on the 'more details' link in a property's map marker a lightbox style window opens with the full details. If you want to be able to search for rental properties whilst on the move Rent Compass is also available for the iPhone.

    This Google Maps mashup shows the location of bring your own wine restaurants in Toronto. 

    If you click on a map marker you can get the address of the restaurant and the corkage fee. The restaurants are also listed under the map. 

    Podcast: What is the Role of Gulf Spill Mobile Mapping Apps?


    A flurry of iPhone, Android and Blackberry apps to submit citizen collected data about the oil spill in the Gulf of Mexico began appearing in May. Now there are perhaps several dozen apps available. What's the impetus for all the apps? What's happening to all the data collected?




    Listen Now (to download, right click on the link at left and choose "save target as")

    The Tour de France Real-Time Tracking


    Last week I reported that Google and the HTC/Columbia Professional Cycling team were releasing a Tour de France API. The API allows you to grab real-time data of the nine riders from Team HTC - Columbia and see their exact locations and real-time telemetry data.

    Google have put together an example Google Map of what you can create with the data. The Google Map shows the real-time location of all nine riders. You can select any of the nine riders and track them individually on the map. You can also view real-time speed, power, cadence and heart rate.

    Don't forget you can also track the riders in real-time using Ubilabs Tour de France Google Map. This year the map works with the iPhone, Android phones and the iPad, so now you can get race updates where ever you are.

    Slightly Off Topic: Crowdsourcing Class Discussions


    With the support of the both the folks I work for at Directions Media and the folks I work for at Penn State, I'm trying an experiment this semester that involves you, readers of this blog.

    I am teaching a course in the MGIS program at Penn State called "Trends in Geospatial Technology." (It's released under an open license.) It's a seminar style course that each week looks at one or two, related or unrelated, trends in our space. There are readings, short "research" assignments and, most importantly, discussions. 

    These do not occur synchronously (that is, we don't all meet at the same time) but rather asynchronously (whenever participants choose to login and participate). That makes it really easy for almost anyone, anywhere, to join in on a topic of interest. And, that's what I am inviting readers to do! Each week I will post the topic(s) for the week and if you are interested in joining our discussion (using some new technology called VoiceThread) I will invite you to join us! The commitment is not huge - come visit at least twice and add your perspective, insights, questions. 

    Each new lesson begins on a Wednesday, so each Monday (well this week it's Tuesday due to the holiday) I'll share the topic. If you want to be a guest of the class just shoot me an e-mail at my school address (abs15(at)psu.edu).

    The topic for Week 1, beginning July 7: Data Storage and Trends in Data Storage.

    Thanks for your consideration!