BOSTON — The next time your car hits a pothole, a new technology could help you immediately tell someone who can do something about it.

Boston officials are testing an app called Street Bump that allows drivers to automatically report the road hazards to the city as soon as they hear that dreaded "thud," with their smartphones doing all the work.

The app has sparked interest from other cities in the U.S., Europe, Africa and elsewhere that are imagining other ways to harness the technology.

Before they even start their trip, drivers using Street Bump fire up the app, then set their smartphones either on the dashboard or in a cup holder.

The app takes care of the rest, using the phone's accelerometer — a motion-detector — to sense when a bump is hit. GPS records the location, and the phone transmits it to a remote servers hosted by Amazon's Web services division.

The system filters out things like manhole covers and speed bumps using a series of algorithms — including one that can tell if the initial motion is up over a speed bump, as opposed to down into a pothole. If at least three people hit a bump in the same spot, the system recognizes it as a pothole.

As in many northern cities, potholes are a real problem for Boston, where crews patch about 19,000 of them a year after the annual freeze-thaw cycle, according to Matthew Mayrl, chief of staff in the city's public works department.

"So you can imagine that driving 806 miles of roadway and getting an accurate count of where every pothole is a gigantic task," he said.

City officials hope the app might allow them to save money by creating a real-time map of potholes that need to be fixed and eliminating the need to send out city trucks or contract an engineering company to troll hundreds of miles of roadways looking for damage.

"What this technology allows us to do — because we imagine dozens and hundreds and possibly thousands of people using it — it essentially creates a new way for people to donate their data in solving public-good challenges," said Nigel Jacob, co-chairman of the Boston Mayor's Office of New Urban Mechanics, which manages the project.

Street Bump cost a total of $45,000 from Boston city coffers and insurer Liberty Mutual Group to develop the prototype. It became available for free in the iTunes store in June, and experts are working on the Android version.

The first version collected lots of data but couldn't differentiate between potholes and other bumps. So InnoCentive, a Waltham, Mass., crowdsourcing firm, threw the challenge out to a network of 400,000 experts and offered them a share of $25,000 in prize money donated by Liberty Mutual.

There has been so much interest from other cities in the U.S. and abroad that Boston is preparing to release the code to the public by the end of the summer so others can tweak the software for their needs. Proposals include using it for early detection of earthquakes and creating a "black box" for police cruisers that could show whether a vehicle was stationary or moving before a crash to stop people who hit parked police cars from claiming officers crashed into them.

"I think people are really interested in the concept," Jacob said. "Right now, the feedback we've gotten is ... 'Very interesting app, how do we use it in our city?' "