Earthquake Early Warning in Japan

As one of the most earthquake prone countries, Japan has the Earthquake Early Warning (EEW) system that literally provides information of upcoming earthquake about quarter to half seconds before. It is issued by Japan Meteorological Agency (JMA) right after earthquake is detected in Japan. The residents in Japan can receive the warning through various media such as TV, radio, internet and mobile phones, which beep and flash when it warns.
The system was started to be used generally since October 2007, and almost all mobile phones released after that are installed the application.

 [How does EEW work?]
There are two main types of seismic waves: P-waves (initial tremors) and S-wave (main tremors). P-waves are the first to travel outward. They are followed by S-waves, which cause stronger tremors. Most earthquake-induced damage results from these S-waves.
After P-wave is detected by observation points, the data is transmitted to JMA, which provides the information of upcoming earthquake including the intensity, and starts countdowns to quake arrival. The source is below.)

The Original Image by Genppy (the Creative Commons Attribution-Share Alike 3.0 Unported)
Translated by Japan Style

 By knowing that an earthquake is coming, we have more possibility of avoiding the worst that could happen. In the 15 seconds, you can do such things as turning gas off, hiding under a table, safely going outside, or grabbing emergency bag.

The video below shows that the EEW warns the Tohoku region earthquake happened on March 11, and inside of a house in Tokyo gradually starts shaking. You can see the countdown and how the quake gets strong.

 EEW is a very convenient system; however, the 9.0-magnitude quake broke many seismographs in the area, and there were some troubles detecting aftershocks. Hopefully,   the system gets back to normal again and even more accurate in the future.

 Souce: The Earthquake Early Warning (English)