There is a prevailing myth, though not entirely unfounded, that heroin users are self-destructive. That to do heroin means to disengage from the world, opting for a slow, secluded death. A closer look reveals this isn’t the case. Most heroin users, in fact, go to great lengths to ensure their survival.

Take Scott, 25, who goes to such lengths—however futile in practice—to ensure he does not die from an accidental heroin overdose. “Once I register [draw blood in the needle] and push the plunger down I call my girlfriend,” he told The Daily Beast. Only, his girlfriend does not know he is using. “I assume if I were to fall out [overdose], hopefully she would put the pieces together and do the right thing and call 911, but I am not sure that plan would ever come to fruition.”

When at home with his family, Scott uses similar survival tactics. “I shoot in the bathroom downstairs and then walk out immediately and go talk to my mother or sister.” This logic stems from the sin qua non will to survive—or fear of death. The hope, and it’s a big hope, is that in case of an overdose, someone would stumble upon him before it’s too late.

I also utilized crude survival tactics when I did heroin. My apartment was on the eighth floor, the same floor that had a communal deck. After fixing a shot I’d immediately walk down the hall toward the deck to smoke a cigarette, where hopefully someone would find me in case I OD’d. I knew this was wishful thinking, but it was all I had at the time.

But there’s a more effective means of survival in the form of a harm reduction mobile app for Android, marketed to users like Scott. The app, called Remote Egg Timer, alerts an emergency contact—set by the user—when it detects that he or she has overdosed. A user sets a timer on the app, say for 10 minutes. The user will then proceed to inject his or her dose. By the time 10 minutes is up and the user has not pushed the stop button, a text message will automatically be sent to the emergency contact.

“This is an automated request for help. Unresponsive after using. Would you mind checking up on me?” reads the default message. But one can adjust it to say whatever they want it to say.

I would change it to: “Urgent medical emergency. Cannot breathe, please call 911,” and give my location, said Kathie Kane-Willis, director of Illinois Consortium on Drug Policy at Roosevelt University in Chicago. She told The Daily Beast that it’s best to leave drugs out of the equation when phoning in an overdose, because police are more likely to arrive on the scene and criminal charges may follow. If you use the app, be sure you’re aware of what the 911 Good Samaritan Laws are in your area (find out here).

It goes without saying, you cannot be revived if your emergency contact does not know where you are. So one feature includes sending the user’s GPS coordinates. Another feature prevents the text from misfiring when there is not an emergency. If the user only nods out, or forgets to press the stop button, the app will vibrate and sound off an alarm, alerting the user that the text is about to be sent.

Time is critical when dealing with an overdose. Unless fentanyl or other dangerous contaminants are present, it’s rare for someone to die immediately after injection. If someone is swiftly alerted this should allow ample time for intervention with naloxone, the overdose antidote. Heroin and painkillers killed more than 28,000 people in 2014—how many of them could have been saved had there been someone watching out for them?

Remote Egg Timer’s interface and function, all the way down to its name, was molded while the app’s developer, Chris Oelerich, 29, was receiving feedback from actual opiate users on Reddit during a fascinating focus group-like discussion.

Because Oelerich is not himself an opiate user, he enlisted the help of his friend, who on Reddit goes by the name “heroinking,” and was charged with introducing Oelerich to a tight-knit community of opiate users in the subreddit /r/Opiates.

“We were going camping and [heroinking] asked us if we minded if he shot up,” Oelerich told The Daily Beast, about his first (and only) experience being around opiate use. “What are you going to say? Like, he’s just going to go off in the woods to do it anyway. So I shined the flashlight on his arm while he shot up.”

“It was surreal, like, ‘Oh, people actually do heroin,’” Oelerich said. Which illustrates the reason for harm reduction technology. People are never going to stop using heroin and other drugs, so it is best to make it as safe as possible.

Given heroin use more than doubled among young adults ages 18—25 in the past decade, many users now have smartphones. But of course, this mode of harm reduction still caters to a limited set of users. Marilee Odendahl lost her son to an accidental overdose and she told me it wouldn’t have been likely he would use Remote Egg Timer.

“Finances—pure and simple,” she stated as the reason. “If he had money for something besides drugs he would spend it on a place for the night, a meal, a forty [ounce], a friend, music. But a monthly phone plan and an app? Not bloody likely,” she said. The app, however, is free.

“If it saves lives,” she added, “if one person will use it and have their life saved, then that is stupendous.”

Opiate users feel the same way. With the help of heroinking, the crowd of opiate fans welcomed Oelerich’s idea. “I will totally download this and I’ll get my sister to as well,” wrote user OxyCaughtIn. “Be good for times when we can’t watch out for each other.”

The app still has potential to evolve. Oelerich told The Daily Beast that he wants to use the phone’s internal accelerometer to detect an overdose because the timer, though it is the easiest, isn’t the best way. “What I’d like to do is use the accelerometer so if it doesn’t detect movement after a certain amount of time it can set off an alarm, and if that’s not responded to it can send the text.”

While there is a need for harm reduction technology, and people affected by the current crisis welcome such innovative solutions, it isn’t met without criticism. When I asked Oelerich if he thought about the counter-arguments against harm-reduction, that it “enables” drug use, he said, “If people are going to keep using heroin, then making it harder isn’t a great strategy.”

“The whole criminalization of drugs thing doesn’t make sense to me,” Oelerich said. “It’s not an easy cut-and-dry answer, but it hasn’t worked, so here we are,” in the midst of an opiate crisis where more than 100 people die every day.