Students spend nearly a third of the school day on their phones, and frequent checking may make it harder to stay focused in class.