Following the Kobe earthquake in 1995, Japan developed a vast earthquake early warning sensor network across the country entire. The timing of an earthquake cannot be forecast with current technology however as soon as an earthquake is detected it's relayed through the mobile phone network to give people advance warning. In Tokyo we get about 10 seconds warning of an earthquake in Sendai, near the March 2011 epicentre. Not much, but enough to get to the kids and check they're safe.
Recently a new discussion has started. Now smartphones are so prevalent, why not use them to detect earthquakes. When the shaking starts enough peoples phones can relay this for a central system to identify what it is and sound the alarm to the wider populace. The interesting thing about this for me is that this technology does not require the billion dollar investment of a sensor network. Just a lot of smartphones. This means it can be exported to countries that couldn't afford one. And that has to be a good use of a mobile phone.