The app doesn't store any recordings or require access to a phone's camera, making it popular in follow-up studies with drug users, according to the team behind it. It was tested on 194 participants using heroin, fentanyl, or morphine in a supervised injection facility in Vancouver, reports MIT Technology Review. The system accurately identified apnea (a temporary halting of breathing) 97.7 percent of the time and slow breathing 89.3 percent of the time -- both signs of a potential overdose. Two of the 94 study participants had to be resuscitated by onsite staff, noted the Associated Press.

In an even bigger study, the app correctly predicted 19 of 20 simulated overdoses by once again tracking breathing, this time in an operating room where anesthetics were used to imitate the problem. The findings were reported in the journal Science Translational Medicine.

Overdoses involving opioids (including prescription pain relievers, heroin, and synthetic opioids such as fentanyl) killed more than 47,000 people in the US in 2017. The economic cost of the misuse of prescription opioids is pegged at $78.5 billion a year in the US alone, according to the National Institute on Drug Abuse.

As a result, researchers are increasingly turning to tech in a bid to help relieve the burden. Just last month, a team from Carnegie Mellon University showcased a wearable band that could alert the wearer to a possible overdose, giving them enough time to administer the medication naloxone to reverse the situation.

As for the Second Chance app, its creators have patented the tech and plan to get approval from the Food and Drug Administration. Ultimately, they want to integrate the app with 911 so emergency services can reach those who've overdosed even quicker.