As screenshots of Android earthquake alerts spread across social media, users began asking the same question: How was Google able to send a warning before the earthquake was even felt?

The curiosity grew after two major earthquakes, reported at magnitudes 7.1 and 7.5, struck Venezuela and caused widespread damage, with several buildings reportedly collapsing in affected areas. Amid the chaos, many Android users shared screenshots showing they had received earthquake alerts moments before the strongest shaking began.

One notification, widely circulated on X, warned of a possible earthquake detected roughly 341 kilometres away and estimated its magnitude before many people in the area realised what was happening.

The alerts left users both surprised and grateful.

"I did receive that notification," one user wrote on X.

"Android warned me," another posted.

Some said the alert gave them enough time to leave buildings and move to safer locations. One user even joked that the experience was enough to make them switch phones, writing, "I'll trade in my iPhone for an Android."

Others admitted they initially ignored the warning.

"I got that too and thought it was about another country," one user wrote. Another added, "Many of us didn't even believe it."

So, how did Google know an earthquake was coming?

The answer lies inside billions of smartphones.

Most modern Android devices contain an accelerometer, a sensor commonly used to rotate screens when users switch between portrait and landscape mode. However, the same sensor can also detect ground vibrations.

When a phone detects movement that resembles the early signs of an earthquake, it anonymously sends data and an approximate location to Google's Android Earthquake Alerts System.

A single phone is not enough to confirm an earthquake. But when multiple devices in the same region detect similar vibrations at nearly the same time, Google's systems can quickly identify a potential seismic event.

The company then analyses signals from nearby devices to determine whether an earthquake is occurring and, if necessary, sends warnings to users in affected areas.

Why the alert arrives before the shaking

The key is that earthquakes travel in different types of waves.

The first waves released by an earthquake, known as Primary Waves (P-waves), move extremely fast and are usually less destructive. These are followed by Secondary Waves (S-waves), which travel more slowly but are responsible for much of the strong shaking and damage.

Because smartphones can detect the earlier P-waves, Google's system receives those signals almost instantly through internet or mobile networks. Data travels at nearly the speed of light, allowing Google's servers to analyse information from thousands of devices in seconds.

That means alerts can sometimes be sent before the slower, more damaging waves reach nearby cities and towns.

In situations where the earthquake's epicentre is hundreds of kilometres away, users may receive several seconds and occasionally even longer of advance warning.

Google says more than two billion Android devices contribute to its earthquake detection system, effectively creating one of the largest distributed seismic monitoring networks in the world.

The Android Earthquake Alerts System is available in several countries, including India, where it has been active since 2023 on devices running Android 5 and newer versions.

The system issues two types of notifications, tapping on either alert provides safety guidance, estimated earthquake details and a map showing the event's location.

To receive alerts, users must have mobile data or Wi-Fi connectivity enabled. Those who do not wish to receive earthquake alerts can disable them in their device settings.