Among the many things the Bay Area learned from the recent shaker near Napa is that UC Berkeley’s earthquake warning system does indeed work for the handful of people who receive its messages, but the rest of us find out about a tremor only after it knocks us out of bed.

Silicon Valley has made apps that tell us when our Uber ride is approaching, our air conditioning has broken or a thunderstorm is brewing. Yet despite being home to the most devastating earthquakes in the country, the region does not have a high-tech earthquake alert system for the public.

But since last month’s temblor, more tech companies are trying to solve that problem. A handful of startups are developing apps that would quickly broadcast warnings of upcoming quakes to users on their smartphones, tablets or other gadgets. Already, the much-joked-about messaging app Yo has rolled out “Earthquake Yo” to hundreds of users.

In addition, established giants such as Cisco and Google are pouring resources into Internet-powered alert systems or quake detection technology. Other companies are taking unusual approaches to detect quakes; for example, a high-tech lock startup thinks the sensors it has on door locks could give an early warning of a temblor.

This is an area where the U.S. lags much of the world. China, Turkey, Mexico and Japan have had public earthquake detection and alert systems for years; Japan’s is considered the most sophisticated in the world.

The challenges for California are two-fold: to build a robust earthquake detection system, and to create devices and apps that receive an alert when a quake strikes and send out warning messages to the public.

The Bay Area’s best effort so far at detecting quakes is UC Berkeley’s ShakeAlert — a collaboration with Caltech, the University of Washington and the U.S. Geological Survey to monitor quake activity in the state using a network of sensors. The system works by detecting so-called P-waves, which move almost imperceptibly through the earth at almost twice the speed of a quake’s destructive S-waves, which shake the ground.

About five seconds after the quake strikes, the sensors send a message to a network of computers that geologists, researchers, BART and emergency responders have access to. The system cannot predict a quake — currently, no technology can — but it can give people who live some distance from the epicenter a few seconds to head for safety, and it did that for a handful of people the morning of the Napa quake.

ShakeAlert, which started in 2012, has the earthquake detection piece of the puzzle, but not the devices and apps to deliver it to the public. Project developers say they want to build a system that would send alerts to smartphones, tablets, TVs and Internet-connected cars, yet the project has an $80 million shortfall and no dedicated public money. Private tech companies may be the only solution to create a high-tech earthquake alert system available to the masses before the next one hits, according to tech experts and geologists.

Indeed, the technology needed to send out alert messages using real-time data is relatively simple and has been around for years — think of the Amber Alert messages sent to mobile phones when a child goes missing. So why hasn’t a startup built an earthquake alert app yet?

Until recently, they couldn’t make any money doing it. Earthquakes are “so unpredictable that you’d never know when you would get paid,” said Shomit Ghose, a partner at Onset Ventures in Menlo Park.

What’s changed? First, tech experts say, is the booming Internet of Things business, which includes Web-connected home devices such as Nest, the smart thermostat owned by Google. Such devices connect to the Internet and send alerts to your phone or email, in addition to collecting data from your home such as temperature and energy use.

A company could even add an earthquake warning system to the connected alarm systems, door locks, water meters or air conditioners they already are selling — and add the earthquake detection piece as well. Smart devices could sense when the ground starts rumbling and send out mass alerts.

“And if you’re willing to pay $9.99 per month for Spotify,” said Paul Santinelli, a partner at Palo Alto VC firm North Bridge, “you probably are willing to pay $20 or $30 a year for earthquake disaster warnings.”

That’s what some tech companies are betting on. San Francisco startup Lockitron, which makes door locks that users can open with their smartphone, is creating knock-vibration sensors that will alert a homeowner when someone is knocking at the front door. Since the Napa quake, co-founder Cameron Robertson has been exploring ways to use the vibration sensors to detect quakes and send alerts to customers.

“If you have 1,000 homes where the knock sensors start going off at the same time,” that could be a warning sign of a quake, he said. When the knocking starts at homes near the epicenter, an alert could be sent out and homes farther away could have a bit of time to prepare, he added.

But the best quake detection technology remains the system set up by the USGS, and it is in talks with more tech companies to give them access to the once-proprietary real-time data from its earthquake sensors — the same data that the ShakeAlert system uses.

Right now, Google is the only tech company with an agreement to access the program’s earthquake data feed. The search giant is working on an app that one day may include earthquake early-warning alerts.

It aims to “provide the public with information it needs to make informed decisions in times of crisis,” a spokeswoman said.

In the meantime, some startups have come up with earthquake apps on the fly. Kyle Noble, a developer in North Carolina, spent a weekend building the earthquake messaging app for Yo, the San Francisco-based startup that sends “Yo” messages to users. It wasn’t an early warning, because the app connects to the USGS website that publishes earthquake activity at about a two-minute delay. But it got people’s attention — the number of Earthquake Yo users jumped from 400 to 1,800 after the quake.

Noble said he built the app to help his dad, a humanitarian aid worker: “I figured the sooner he gets the alert, the sooner he can start preparing a response.”

A data analysis firm employed by President Donald Trump's 2016 campaign tapped the Facebook profiles of more than 50 million users without their permission, allowing it to capitalize on the private social media activity of a large portion of the U.S. electorate, newspapers reported Saturday.