Is there an app to lock phone while driving?
OneTap. OneTap blocks incoming calls and texts and automatically informs the sender that you're unavailable to talk. It automatically turns on every time you start moving your vehicle.
How can I stop using my phone while driving?
Driving Detective for Android detects when you're moving and turns on Do Not Disturb mode. Google Pixel 2 or 3 allows you to set your phone to automatically turn on Do Not Disturb when you're driving (Pixel 2) or turn on driving mode (Pixel 3).