A former police officer accused of accosting a minor had online contact with an undercover officer, police reports show.