AUSTIN — When an ex-girlfriend accused Cristopher Precopia of attacking her, he said he didn't do it. But how could he prove his innocence?

“I can say totally, 100 percent, where he was at,” Precopia’s mother, Erin, said.

She posted a photo with Precopia on the same evening the woman said the attack happened.

"This is one of those cases where I could definitely prove he did not commit this offense,” Precopia's attorney Rick Flores said.

Precopia had a time, a date, a location. An alibi, all thanks to a selfie.

RELATED: How a selfie saved a Williamson County man from 99 years in prison

"Our smartphones now are basically an extension of ourselves,” Matt Danner, a computer forensic examiner at Flashback Data, said.

Danner didn’t work on this case, but he works on others and helped explain the technology behind this evidence.

"It's become an extremely useful piece of evidence in both criminal and civil cases,” Danner said.

He said people are often surprised about how much your device can share about you.

"There's a plethora of things that your phone is recording when you're using it,” Danner said.

According to Danner, while your location services are on, your phone is almost constantly recording your location. Most of the time, it's just to target you with ads, but when you take a photo, it also takes a snapshot of your location, time and the model of your phone.

But when you post photos to social media, it’s a different story.

"Theoretically, you could tag something and say you're somewhere that you're not,” Danner said.

He said social media sites wipe the data information from the photo.

"So, if I were to go to your Facebook account and download an image from your Facebook, if I tried to get that location data, it's not going to be there anymore,” Danner said.

However, sites like Facebook may record your IP address, allowing experts to determine where you made the post.

"Most of us have our entire lives on our smartphone,” Danner said.

So, what can you do to find out what's out there about you?

Facebook and Google allow you to download a report about your usage from what you've searched, to where you've been, to who you've emailed.

"It has all the data that they have for your user account available for you to review,” Danner said.

If you really don't want that information out there, just turn off your location services.

Danner said he often gets questions about deleted texts and photos. Depending on the phone, experts can sometimes recover them -- but most of the time, if you delete a photo from an iPhone, it's gone forever.

But if you’ve backed up your phone on your computer or a cloud account, those items could still live there.