Heads Up
                                                                  Pic credit - XDA 

                Google soon will notify you to no to focus on phones while walking on roads , as a new update by " Digital Wellbeing " (Product by Google) the update by google will notify you as soon as you spend certain time on phone while walking on roads . The update uses your location and with the help of google's machine learning the app easily tracks your location and notifies you to " HEADS UP " so that you can concentrate on what's going on your surroundings rather than looking at your chats . And it is said that according to XDA that the update might first arrive for pixel users and after some months to all other android users .

Working 

               The Working of app is very simple to understand as to explain it in a very non technical way is that the app uses your GPS location with the help of default Google Maps . And to enable it you should enable GPS of your phone or allow google to use your phone's GPS on its own . That's it .

Kinda Suggestion  

             Its will best if the update not only notify you but give you a countdown to freeze if the user uses phone even after the countdown notification then the phone just freeze down in certain given default time and will last till the user reaches a safe place . And the one thing to mention that the freeze down will not work if the user id talking to some one on audio call ( because call option should be active for emergency usage ) . Overall the update is the one of the best till now so no doubt and kudos to google for the update.