Sefa Kart/Getty

On Tuesday morning, Android phones around the San Francisco Bay Area buzzed with the alarm that a 4.8 magnitude earthquake was about to hit. “You may have felt the tremors,” some reports said. More than a million Android users saw the alert. And for some, it came seconds before the earth even began to move.

This isn’t the first time Android devices have received such alerts, says Mark Stogaitis, project manager for the Android Earthquake Alert System. But because the Bay Area is so densely populated, the alert hit enough phones that the wider public took notice. Earthquakes have historically occurred without warning, catching people by surprise and leaving them with no warning to drop and hide. Such alerts are aimed at removing the unpredictability of earthquakes, even if they last only a few seconds.

“One of the things we’re trying to do is build an earthquake early warning industry,” says Robert de Groot, who is part of the ShakeAlert operations team, a US Geological Survey project that detects early signs of earthquakes. “We’re doing things we’ve never thought of.”

Technology doesn’t predict earthquakes—no one can, and neither can the USGS says he doesn’t think he’ll learn how to predict earthquakes “in the foreseeable future.” But he detects them earlier than people usually do. And experts hope that warnings will one day be sent out even faster, giving people more time to avoid danger.

Time to ride

Tuesday’s Android alert was based on data from ShakeAlert, which detects when an earthquake begins on the West Coast and provides information to state government agencies and third parties. And Google has taken steps to make that information more accessible in those precious seconds. First, the company built the alert into its own system, sending push notifications to people with Android phones in the earthquake zone without having to download a separate app.

Here’s how it works: When an earthquake occurs, it sends softer seismic waves, known as P-waves, through the ground. Not everyone in the earthquake zone will feel it, but the USGS network of 1,300 sensors will. When four sensors are activated simultaneously, they send a signal to the data center. If this data meets the right criteria, the ShakeAlert system determines that stronger S waves may be on the way that could harm people. That’s when warning systems like Google, a program called MyShake, or government agencies like the Federal Emergency Management Agency and transportation systems will interpret the data and send out alerts.

There are limitations. These S waves move quickly; the closer a person is to an earthquake, the less likely he is to receive a warning before he feels the shaking. The USGS sensors are expensive and strategically located on the west coast. (By 2025, there will be 1,675, says de Groot.) Also, the hastily compiled magnitude measurements are only preliminary; An Android alert on Tuesday warned of an impending 4.8-magnitude earthquake, but the measurement was taken later adjusted to 5.1.

Google has also turned individual phones into miniature earthquake sensors. All smartphones have accelerometers that can pick up earthquake signals. When triggered, the phone sends a message to the discovery server along with approximate location data, such as what city the device is in. The server then connects the location of the earthquake from the data collected on several phones and transmits the appropriate alerts.

Stogaitis says phones only pick up waves when plugged in and locked. This helps avoid confusion from phones rattling around in bags and pockets. The long-term goal is to send signals at even higher speeds. “We are trying to make the time from which [an earthquake begins] and the time when we detect it and send an alert as soon as possible,” Stogaitis says.

Equipping phones to pick up the signals is a cheaper and faster solution than placing large sensors 10 feet underground in other earthquake-prone areas. But it’s one that requires people and their phones to be closer to earthquakes, de Groot says, and that’s not always the case. However, all these sensors – underground and in your pocket – do provide new and unprecedented warnings and decisive seconds to drop and cover, which people must do as soon as possible. People usually don’t feel an earthquake until it’s already happened, says de Groot. “Now you are in a situation, you are now in the center of it. But doing something before the shake comes is relatively new. So we are really looking for a better way [get people] to do it.”

This story originally appeared on