POCATELLO, Idaho (KLIX)-A Texas man will spend at least 22 years behind bars for trying to get a child to engage in sexual activity.

This week U.S. Attorney Bart Davis said John Alan Mahler, of College Station, Texas, was sentenced in U.S. District Court for sexual exploitation of a child. Mahler pleaded guilty to the charge in January in which he will have to serve 15 years of supervised release once out of prison and register as a sex offender.

Court records show Mahler, 37, began communicating with a 15-year-old from Idaho in October of 2017, asking the teen to engage in sexual activity by using several apps like Google Hangouts and Kik Messenger.

"During the online communications, Mahler sent numerous messages attempting to persuade, induce, and entice the minor child to engage in sexual activity," Davis said in a statement.  Mahler would expose himself during video chats with the teen.

Judge B. Lynn Winmill ordered Mahler to give up his laptop and cell phones that were used in the crime.

More From 95.7 KEZJ