OAKLAND, Calif. — In one of the most far-ranging attempts to halt the spread of the coronavirus, Apple and Google said they were building software into smartphones that would tell people if they were recently in contact with someone who was infected with it.
The technology giants said they were teaming up to release the tool within several months, building it into the operating systems of the billions of iPhones and Android devices around the world. That would enable the smartphones to constantly log other devices they come near, enabling what is known as “contact tracing” of the disease. People would opt in to use the tool and voluntarily report if they became infected.
The unlikely partnership between Google and Apple, fierce rivals who rarely pass up an opportunity to criticize each other, underscores the seriousness of the health crisis and the power of the two companies whose software runs almost every smartphone in the world. Apple and Google said their joint effort came together in just the last two weeks.
Their work could prove to be significant in slowing the spread of the coronavirus. Public-health authorities have said that improved tracking of infected people and their contacts could slow the pandemic, especially at the start of an outbreak, and such measures have been effective in places like South Korea that also conducted mass virus testing.
Yet two of the world’s largest tech companies harnessing virtually all of the smartphones on the planet to trace people’s connections raises questions about the reach these behemoths have into individuals’ lives and society.
“It could be a useful tool but it raises privacy issues,” said Dr. Mike Reid, an assistant professor of medicine and infectious diseases at the University of California, San Francisco, who is helping San Francisco officials with contact tracing. “It’s not going to be the sole solution, but as part of a robust sophisticated response, it has a role to play.”
Timothy D. Cook, Apple’s chief executive, said on Twitter that the tool would help curb the virus’s spread “in a way that also respects transparency & consent.” Sundar Pichai, Google’s chief, also posted on Twitter that the tool has “strong controls and protections for user privacy.”
With the tool, people infected with the coronavirus would notify a public health app that they have it, which would then alert phones that had recently come into proximity with that person’s device. The companies would need to get public-health authorities to agree to link their app to the tool.
President Trump said on Friday that his administration planned to look at the tool.
“It’s very new, new technology. It’s very interesting,” he said. “But a lot of people worry about it in terms of a person’s freedom.”
Privacy is a concern given that Google, in particular, has a checkered history of collecting people’s data for its online advertising business. The internet search company came under fire in 2018 after it said that disabling people’s location history on Android phones would not stop it from collecting location data.
Apple, which has been one of the biggest critics of Google’s collection of user data, has not built a significant business around using data to sell online advertising. Still, the company has access to a wealth of information about its users, from their location to their health.
There are already third-party tools for contact tracing, including from public health authorities and the Massachusetts Institute of Technology. In March, the government of Singapore introduced a similar coronavirus contact-tracing app, called TraceTogether, that detects mobile phones that are nearby.
But given the number of iPhones and Android devices in use worldwide, Apple and Google said they were hoping to make tracing efforts by public health authorities more effective by reaching more people. They also said they would provide their underlying technology to the third-party apps to make them more reliable.
Daniel Weitzner, a principal research scientist at M.I.T.’s Computer Science and Artificial Intelligence Laboratory and who was one of those behind the school’s contract tracing app, said Google and Apple’s partnership will help health officials save time and resources in developing their own applications to track the virus’ spread.
One challenge for third-party apps is that they must run constantly — 24 hours a day, seven days a week — to be effective. Google said some Android smartphone manufacturers shut down those applications to save battery life.
Apple and Google said their tool would also constantly run in the background if people opt to use it, logging nearby devices through the short-range wireless technology Bluetooth. But it would eat up less battery life and be more reliable than third-party apps, they said.
Once someone reports his or her infection to a public-health app, the tool will send the phone’s so-called broadcast beacons, or anonymous identifiers connected to the device, to central computer servers.
Other phones will constantly check those servers for the broadcast beacons of devices they had come near in the past 14 days. If there is a match, those people will receive an alert that they had likely come into contact with an infected person.
Apple and Google said they were discussing how much information to include in those alerts with health officials, aiming to strike a balance between being helpful while also protecting the privacy of those who have the coronavirus.
“This data could empower members of the general population to make informed decisions about their own health in terms of self-quarantining,” said Dr. Reid. “But it doesn’t replace the public health imperative that we scale up contact tracing in the public health departments” around the world.
Apple and Google said they would make the tool’s underlying technology available to third-party apps by mid-May and publicly release the tool “in the coming months.” The companies said the tool would not collect devices’ locations — it only tracked proximity to other devices — and would keep people anonymous in the central servers.
Google and Apple’s approach aims to resolve one of the hurdles facing government and private efforts to create contact tracing applications: a lack of common technical standards. The European Commission, the executive of the 27-nation bloc, said on Wednesday that “a fragmented and uncoordinated approach risks hampering the effectiveness” of such apps.
Ashkan Soltani, an independent cybersecurity researcher, cautioned that surveillance tools that start as voluntary often become required through public policy decisions. China, for instance, has introduced a color-coded coronavirus surveillance app that automatically decides whether someone must stay at home or may go outside and use public transportation.
“The danger is, as you roll out these voluntary solutions and they gain adoption, it’s more likely that they are going to become compulsory,” said Mr. Soltani, a former chief technologist for the Federal Trade Commission.
Mr. Soltani said the tool could also be a way for the tech companies to pre-empt efforts by governments in the United States or elsewhere to mandate a more invasive collection of data to combat the pandemic.
“The tool permits them to address the administration’s ask to ‘do something’ while also relieving them of the responsibility of building the app and collecting the data themselves,” he said.
Natasha Singer and Jennifer Valentino-DeVries contributed reporting from New York, Adam Satariano contributed reporting from London and David McCabe from Washington.