Last week, the home-sharing service Airbnb had more than 40,000 listings in Paris, making the French capital the company’s most popular destination for travelers looking to rent a room or an entire apartment. Paris officials applaud it for bringing innovation to the city’s hotel industry.

The ride-hailing company Uber had a much more difficult week.

Thousands of Parisian taxi drivers took to the streets to protest UberPop, the company’s low-cost service that’s similar to UberX in the United States. French politicians denounced the company for defying the country’s transport laws. And two of Uber’s top executives in France were detained by the police and accused of operating an illegal taxi business. By Friday, the company had suspended UberPop across the country.

Uber and Airbnb are similar in many ways. Both born in San Francisco, the companies are now two of the largest entrants in the so-called on-demand economy, in which services are available at the touch of a smartphone button. They are both flush with investor money — with valuations in the tens of billions of dollars — and are using the cash to expand rapidly around the world.