If you want to keep pedestrians and cyclists safe all you have to do is make it illegal to be on the phone in any form while driving a car or truck.
No talking, no browsing, no sms, do not touch the damn phone while moving.
Make that law, enforce that law with real penalties and tada, you've immediately solved 90% of safety problems.
Dedicated, protected, bicycle lanes would be a real plus but either cities just don't want to be bothered or people just drive in the bicycle lane while they talk/browse on the phone.