Off-duty firefighter Scott Brawner was working out in a suburban Portland gym this spring, listening to Pandora, when suddenly the music stopped.

An app on his phone warned him that someone nearby needed CPR. Brawner reportedly raced around the gym, trying to find the victim, before heading to the parking lot, where he saw a man sprawled on the pavement. He began giving the man CPR until fire and rescue units showed up.

The man’s survival wasn’t just a blessing for his family, it was a huge victory for the PulsePoint Foundation, a Bay Area nonprofit whose app is making it easier to alert CPR-trained people that someone nearby needs help.

Crowdsourcing has been used for everything from political campaigns to potato salad, but PulsePoint’s app represents the first time it has been used on a wide scale to help save dying people in cardiac arrest. Victims have very little time — generally 10 minutes or less — to receive CPR before they either lose brain functions or die.

PulsePoint’s free app connects to local 911 call centers and alerts users when there is someone nearby in need of CPR. PulsePoint users get an alert the same time as local emergency responders.

It also shows the location of the closest automated electronic defibrillator (if there is one nearby) as well as a reminder about how to do CPR, just in case the user has an adrenaline-induced brain-freeze. A related PulsePoint app is trying to get people to crowdsource the locations of AEDs so volunteers will know where to find them.

“As a fire chief I was always focused on response times. Trying to get help to people faster,” said Richard Price, a former San Ramon Valley Fire Department chief, who is the force behind the app and the nonprofit foundation that oversees it. Crowdsourcing volunteer CPR-trained volunteers “is a very efficient, low-cost way of making an impact.”

Price came up with the idea for the app five years ago after a disturbing incident one day while eating a sandwich.

He was at a local deli when he heard sirens, Price remembers. Emergency vehicles pulled up and he rushed outside to see what was going on. A man in a shop next door had collapsed and emergency responders were unable to revive him.

“He was on the other side of the wall, I couldn’t see him,” Price says. “He lay there unconscious with no one doing CPR. I had an [automated defibrillator] nearby in my vehicle.”

Although the iPhone had been introduced a few years before, apps that took advantage of location-based information were only starting to be developed.

“It just struck me that we could have off-duty professionals — police, firefighters, nurses and all the CPR trained citizens — who had to be in the exact right place at the right time,” he said. “We have these phones now. Could we use someone’s phone to determine their locations … give them the same capabilities as first responders?”

Price’s fire department had little money to spend on the project. He says he talked to developers around the Bay Area but couldn’t find anyone who would help them for the right price. He eventually connected with a computer science program at Northern Kentucky University, which required students to develop a working app as a graduation requirement.

A group of students created a working prototype “at almost no cost,” Price said. They tested the app in the San Ramon area and eventually found support from PeopleSoft co-founder David Duffield, whose enterprise cloud applications company, WorkDay, volunteered to take over. The company still volunteers engineering time to develop and maintain the technology.

The PulsePoint Foundation was created in 2011, which holds all of the intellectual property for the app, as well as funding from WorkDay and other groups to help expand the app’s reach. The foundation also partnered with Physio-Control, a medical device developer specializing in AEDs, to market the app technology.

Los Angeles County began using the system earlier this month, joining about 700 local communities in 20 states that have connected the technology to their 911 call centers. Another 200 communities are in the process of adding the service, Price said, which generally costs about $5,000 a year.

It used to be free, he said, but that wasn’t possible to continue as more communities began signing on. “Free was somewhat controversial” in the 911 community, he said, adding that PulsePoint oddly became more accepted after it started charging. “You’re connecting to these multi-million dollar systems. [Free] is really out of the ordinary in the dispatch world.”

The goal is to be in every 911 call center across the country. Although PulsePoint doesn’t have any direct competitors, Price says he’d welcome them. “We share a lot of our data. We’re trying to save lives,” he said. “As revolutionary as this concept is, it’s not disruptive in any way.”