Friday, February 27, 2009

Earthquake! for Android

A couple of years ago, the real-time earthquake display on display at the Natural History Museum in New York impressed me so much I stole copied created my own version of their concentric circle filled goodness.

Lately I've been focussing on mobile applications, so I figured why not move the same compelling UI to my Android handset?



Like the exhibit that inspired it, Earthquake! (Applications > News & Weather) shows not just the epicentres, but also an approximated 'damage zone' (inner circle, dark shading) and 'rumble zone' (outer circle, lighter shading) to give an impression of the areas likely to be affected by each earthquake. Zoom in to see which cities and suburbs will feel the tremor, and which are at risk for property damage.

Being a mobile app invites some personalization features not possible on a web site or museum display. Earthquake! lets you configure notification for new earthquakes that cause the phone to vibrate in proportion to the size of the detected quake. Small, magnitude 3 quakes barely shake your phone, but Big One's at 8 or 9 on the Richter scale will vibrate for up to 20 seconds.

Using My Location you can filter notifications to only alert you to earthquakes nearby, or for which you're within the expected 'rumble zone'.

So now if you've got an Android powered phone, you can have you own mobile real-time earthquake display. Then if you wake up in the deserted ruins of a post-apocalyptic nightmare you won't have to wonder whether or not the damage was caused by a magnitude nine earthquake splitting the Earth's crust in two.
The code used to create Earthquake! is a polished version of the ongoing example code shown in Professional Android Application Development, so if you like the idea pick up a copy and see how it's done.

11 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Wauw I love this APP!!!! Would it be possible to make an app just like this but then with recent volcano activity / eruptions? That would be fantastic!

    With regards

    lex

    ReplyDelete
  3. Anonymous2:15 am BST

    So, it doesn't do it's update thing on a regular basis. The app is running as per the app task manager. I have to do a manual refresh.

    ReplyDelete
  4. Does this market version app also sends broadcasts of new earthquakes like mentioned in the book?
    I would love to build an app with a BroadcastReceiver to catch these "new_earthquake" intents. Could you tell me how the intent is called exactly so that I can put it in my IntentFilter.

    Is the intent for new earthquakes in your market app the same name as used in the book? "New_Earthquake_Found" or have you used another intent name for the market version?

    ReplyDelete
  5. Hello, I'm a first time visitor of your blog.
    I just wanted to say that I've thoroughly enjoyed your book about Android.
    It works both as a beginner's guide and source code reference because it's full of simple examples.

    ReplyDelete
  6. this article can make me understand that earthquake can be monitor in anywhere.i hope this technology use for people in the active area of earthquake

    ReplyDelete
  7. Nice app all around! Ever thought about color-coding each radius based on magnitude? Just an idea. Keep up the great work!

    ReplyDelete
  8. Anonymous11:13 pm GMT

    Very cool application, nice job. Thanks for making it free also.

    Cheers,
    Dr.Geophysics

    ReplyDelete
  9. Anonymous1:26 pm BST

    Hi Reto. Would like to inform you that last update from earthquake forces close in Htc Magic,there is a lot of people with the same problem.
    Thanks for the aplication.

    ReplyDelete
  10. Just posted an update (2.6) that should (hopefully!) fix the latest Force Close bug.

    ReplyDelete
  11. Anonymous8:45 pm BST

    hey i downloaded your earthquake application source code from wrox.com...on running it on my emulator ,it returned an error:application stopped unexpectedly
    (i had set all d permissions)....actually i am using sdk 2.2 and google api8 version...but i think u developed ur program using google api7...is that a problem?
    plzz help me out as i am developing a google map based application as my final year project....any help would be really appreciated
    thank you.....

    ReplyDelete