Although prison officials have long battled illegal cellphones, smartphones have changed the game. With Internet access, a prisoner can call up phone directories, maps and photographs for criminal purposes, corrections officials and prison security experts say. Gang violence and drug trafficking, they say, are increasingly being orchestrated online, allowing inmates to keep up criminal behavior even as they serve time.