Android phones around San Francisco’s Bay Area buzzed with an alert on Tuesday morning: A 4.8 magnitude earthquake was about to hit. “You may have felt shaking,” some of the messages read. More than a million Android users saw the alert. And for some, it arrived seconds before the ground even started moving.
It’s not the first time Android devices have received these alerts, says Marc Stogaitis, the project lead for the Android Earthquake Alerts System. But because the Bay Area is so densely populated, the alert hit enough phones that the larger public took notice. Earthquakes have historically come without warning, catching people off guard and leaving them with no advance notice to drop and take cover. Alerts like this aim to take some of the unpredictability out of earthquakes—even if by just 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 project under the United States Geological Survey that detects the first signs of earthquakes. “We’re doing things that we haven’t really ever thought of.”
The tech does not predict earthquakes—no one can do that, and the USGS also says it does not think it will learn to predict earthquakes “within the foreseeable future.” But it does detect them earlier than people usually feel them. And experts hope someday the alerts can be sent out even quicker, giving people more time to get out of harm’s way.
Time to roll
Tuesday’s Android alert was powered by data from ShakeAlert, which detects when an earthquake begins on the West Coast and provides the information to state government agencies and third parties. And Google has taken steps to make that information more readily available in those precious seconds. First, the company rolled the alert into its own system, sending push notifications to people with Android phones who are in the area of an earthquake without them 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’s area will feel these, but a network of 1,300 USGS sensors do. When four sensors are simultaneously triggered, they send an alert to a data processing center. If that data meets the right criteria, the ShakeAlert system determines that stronger S waves, the kind that can cause damage and hurt people, could be on the way. It’s then that warning systems, like Google’s, an app called MyShake, or government agencies like the Federal Emergency Management Agency and transit systems, will interpret the data and send out alerts.
There are limitations. Those S waves move quickly; the closer a person is to the earthquake, the less likely they are to get an alert before they feel the shaking. The USGS sensors are expensive and strategically placed on the West Coast. (There will be a total of 1,675 by 2025, says de Groot.) Also, the quickly compiled magnitude measurements are only preliminary; Tuesday’s Android alert warned of a 4.8-magnitude quake approaching, but the measurement was later adjusted to 5.1.
Google has also turned individual phones into miniature earthquake sensors. All smartphones have accelerometers that can pick up signals of an earthquake. If triggered, the phone sends the message to a detection server, along with rough location data, like the city a device is in. The server then pieces together where the earthquake is happening from data collected on multiple phones and beams out the relevant alerts.
Stogaitis says phones only pick up the waves when plugged in and locked. That helps to avoid confusion from phones jostling around in bags and pockets. The long-term goal is to send signals with even more speed. “We’re looking at trying to make the time from which [an earthquake begins] and the time that we detect it and send an alert as fast as possible,” says Stogaitis.
Equipping phones to pick up signals is a cheaper and quicker solution than planting larger sensors 10 feet underground in other earthquake-prone areas. But it’s one that requires people and their phones to be present closer to the quakes, de Groot says, and that’s not always the case. Still, all of these sensors—underground and in your pocket—do provide novel and unprecedented warnings and crucial seconds to drop and cover, something people must do as quickly as possible. People typically don’t feel an earthquake until it’s already happening, says de Groot. “You’re now in a situation, you’re now in the middle of it. But doing something before shaking arrives is something that’s relatively new. So we’re really looking at the best way to [get people] to do that.”
This story originally appeared on wired.com.