Read Annie Carpenter's response:
There are some things that come up for me as a teacher that I let slide, knowing that my students will get it when they get it. Having their cell phones in the classroom is not one of them! One way of setting boundaries is to let students know that behavior in the room has an impact on the other students; if a cell phone rings or vibrates, then clearly the students nearby will hear it. Also, if the student is checking for messages regularly, others will see this and may be reminded of their own lives outside of practice.
Reminding your students to leave the phones at home or in the car can be helpful. If they must bring them in, make sure there's a safe place away from the practice area for storage, and remind students to turn cell phones off.
See if you can take use opportunity as a teaching tool for your students. In a way that is comfortable for you, design a practice that highlights steady concentration. This focus on mindfulness will keep students present so their minds don't wander back to the parts of their lives symbolized by their phones. Set up class with a slow, rhythmic Ujjayi Pranayama (Victorious Breath), or perhaps design a practice with emphasis on steadiness of dristi, or focal point, and invite them to keep this focus throughout the practice. Gently remind your students from time to time to check in on the consistency of this one specific awareness.
Practice is a sacred time for all of us, away from the stress of the outer world. Choosing to concentrate—no matter how demanding or fascinating the outer world—is the practice.