Over the course of time since Hangouts has been available via mobile devices like Android smartphones and tablets, Google has added in quite a few features which are notable and worthy of attention, not the least of which is the capability to use Hangouts for one's SMS app if they so choose to do so. The most current version of Hangouts is 5.0 although it hasn't popped up for everyone in the Play Store just yet, but most everyone should be on at least 4.0, which is when it seems Google added in a very useful feature that has gone unnoticed to likely a very large group of users; An auto-switch feature for voicemail playback.
To be more specific, seemingly since version 4.0 of Hangouts Google added in a feature for those who use Hangouts to make voice calls, which allows the phone to determine whether or not the user is holding their phone to their ear during the playback of a voicemail. Depending on this particular detail, Hangouts will play voicemail messages through the appropriate audio channel, meaning that if you're holding your phone to your ear during a voicemail it will play the voicemail through the earpiece. If not, the voicemail plays through the speakers as if you turned on speaker playback yourself.
The speaker switch happens to be based-on proximity of the phone, so Google utilized the proximity sensor here to allow Hangouts the capability to figure out how you're holding your device. Users can also move the phone back and forth throughout the duration of the voicemail playback and have it auto switch to the correct audio output if they desire. For example, if you start listening to a voicemail while holding the phone to your ear but your arm gets tired in the middle of it, you can bring your phone down and the voicemail will switch for you so you can hear it through the loudspeaker function instead. This might not be something that everyone gets major use out of, but it's surely one that was well thought out as you won't have to pause a voicemail to allow you time to make the switch, thus also preventing you from missing any important details.