Studies have shown that using smartphones while walking increases the probability of pedestrians colliding with obstacles. Techniques are presented for providing real-time warnings to distracted users of smartphones. The techniques are implemented by an application which makes use of sensors commonly found in most smartphone. By estimating distances to nearby objects using acoustic signals, a generalized solution is achieved without requiring any prior knowledge of the user's environment. The process can be enhanced by using images acquired from the phone's rear camera.