You really need to turn your smartphone entirely OFF when you go to confession. If possible, leave the smartphone in the car.
No, I mean completely
off, as in pressing the switch or button, and powering it down entirely.
You could also remove the battery (unless it’s an Apple device).
When I go to Mass (as opposed to confession), I leave my phone on, with the ringer set to silent vibrate, as I have family responsibilities that could force me to answer a call immediately, or even to leave Mass and return home at once. For the same reasons, I always try to sit on the end of the pew, outer edge of the nave, fairly near a door. I would wait until I am outside to answer or return the call.