A man accused of shooting at a Leesburg Police Department Officer was caught because the smartphone he left behind at the scene of the shooting had his selfie in it, according to police.

Jonathan Nadre Harris was charged with attempted murder of a police officer on Wednesday and had his bond set at $820,000 by a judge on Thursday.

According to a four-page arrest report, police received a search warrant for Harris' cell phone, which they said he left behind at a traffic stop.

A selfie on the phone led to his arrest. The Lake County resident is being charged with several other felonies, including possession of a firearm by a convicted felon, carrying a concealed firearm, resisting an officer with violence and use of a firearm while in the commission of a felony.

Harris told the judge that he wants to be represented by a public defender, which he was appointed.

The state says he should not get bond on the attempted murder charge and a no-bond status because he is a convicted felon and violated his probation.

There are no out-of-county warrants for failure to appear for Harris. His public defender argued that Harris has always made court appearances and should get a bond.

However, the judge set the total bond at $820,000.

Jonathon Nadre Harris, 24, is being charged with attempted murder of a police officer. The skull tattoo on his neck was used to identify him during the search for him, according to officials. (Lake County Sheriff's Office)

On Monday night, Officer Travonte Kitchen pulled over Harris, who was on a bicycle, on Highway 441 for riding with a broken tail light.

According to police, Kitchen told the 24-year-old Harris to put his hands in the air. However, dashboard-camera footage from Kitchen's vehicle appears to show Harris only raised his left hand and placing his right hand in a hooded jacket. He then pulls out a gun and fires at the officer, who fires back as Harris takes off running, according to the dash-cam footage provided by police.

The arrest report says Harris admitted to detectives that he was the one who shot the gun that night.

The firearm used during the alleged crime was recovered by detectives Thursday afternoon. Police said that after ballistics testing, they'll be able to determine if the weapon was the one used against Officer Kitchen.

Harris is a convicted felon in the state of Florida and was recently released from prison.

WATCH: Bicyclist fires shot at Leesburg officer