Donji Cullenbine noticed that her son Alex wasn’t looking people in the face, a classic trait of autism, when he was just 18 months old. In preschool, Alex struggled socially with other kids. One hit him in the face with a rubber mallet and another in the shoulder with a metal shovel.

“He didn’t see it coming,” Cullenbine told NBC News. “When you don’t look kids in the face, you can’t see their reactions or know what to expect.”

When he was 5, he was diagnosed with autism.

I tried to incentivize him to look at me for so many years, but had no movement. Then in two weeks, it was like a flip switched.

Alex, now 9, started working one on one with a therapist using applied behavioral analysis, a technique to improve social behavior, but Cullenbine, from San Jose, California, saw little progress.

“Nothing really changed,” she said. “Until Google Glass.”

Last year, Alex was one of 14 children to take part in a trial administered by the Stanford University School of Medicine. It used Google Glass, the internet-connected eyewear that was discontinued for individual, commercial use in 2015, and a smartphone app to improve communication and social skills for children with autism.

Software developed by the Stanford team works with the outward-facing camera on the glasses to read facial expressions and provide social cues.

The trial, called Superpower Glass, sent families home with the technology, the first time it’s been used outside lab trials. In an earlier test of the technology, 100 kids wore the glasses while interacting with their family members in a lab setting.

Stanford released the results of the trial Thursday, and Dennis Wall, the lead author, explained to NBC News how the program works.

The glasses record what the children are seeing and send that data to the smartphone app. The app then prompts the child to engage with what he or she is seeing while it records the session data. The gamelike interface motivates children to engage with people’s faces and emotions, and provides positive reinforcement if they do.

The program offers three modes to help kids learn to recognize emotion: free play, where feedback on identifying faces and reactions is given in an unstructured way; capture the smile, where kids are prompted to find a person displaying a particular facial expression; and guess the emotion, where the kids identify the facial expression they see.

A green light pops up on the glasses that congratulates the kids for making eye contact, and an emoji on the screen is a reward signal for correctly identifying an expression.

Children generally play the game with a parent or caregiver.

“It’s an opportunity for fun and engagement,” Wall said. “It creates an interaction opportunity for families that might not have happened otherwise.”

Superpower Glass builds on more traditional autism therapy, which often consists of a therapist using flash cards to practice identifying emotion. The introduction of technology provides more ways to practice finding and identifying facial expressions. It can capture data to track progress and allow kids and parents to review video of the session.

Children played the “game” just three times a week for 20 minutes over the six-week trial. But Cullenbine said she noticed results right away. It started with just flickers of eye contact, then progressed to frequent eye contact.

“I was stunned, it happened so quickly,” Cullenbine said. “It was thrilling. I tried to incentivize him to look at me for so many years, but had no movement. Then in two weeks, it was like a flip switched. He said, ‘Mommy, I can read minds.’”

It’s been over a year since Alex wore the glasses, but Cullenbine said the improvement has stuck.

“He seemed to have figured out why we look at each other’s faces,” she said.

Of the 14 families who participated in the study, 12 said they saw improvement in their child’s eye contact, the researchers said.

Thomas Frazier, chief science officer at Autism Speaks, an autism advocacy and research organization, said it can be difficult for families to find a therapist to work with their autistic child.

The trial is an encouraging sign for autism treatment, Frazier told NBC News, not only for the effectiveness it demonstrated, but also for the program’s potential to make treatment more accessible.

"In areas without too many health care providers, it’s tough,” Frazier said. “But even in big cities, there can be a long wait.”

Still, he cautioned that there was more work to do.

“We have to see if it’s effective beyond traditional treatment in a meaningful way,” Frazier said. That would include larger trials that follow kids over time and use control groups.

Wall's goal is for the Google Glass program to be widely available as treatment for autism and covered by insurance.

Cullenbine hopes so too. “I hope it gets into more people’s hands very soon,” she said.

She said Alex does well in school and is precocious in certain ways intellectually. She doesn't want his social struggles to hamper his potential.

“How can he work on a team or go on a job interview without looking at people’s faces?” she asked. “But now, we have hope.”

CORRECTIONS (Aug. 2, 2018, 12:36 p.m. ET): An earlier version of this article omitted the first name of the lead author of the study. He is Dennis Wall. A caption with the article also misstated the last name of Alex, the 9-year-old boy who participated in the study. His mother, Donji Cullenbine, asked that his last name not be published; it is not Cullenbine.

CORRECTION (Aug. 3, 2018, 6:13 p.m. ET) An earlier version of this article misstated Alex's age when he was diagnosed with autism. He was 5, not 6.