setProximityEnabled

Turns on the proximity sensor so holding the phone to your ear moves audio from the speaker to the earpiece, as a phone call does.

A device chosen with Room.changeMic or Room.setAudioDevice, or a connected headset or Bluetooth device, outranks the sensor.

Parameters

enabled

true to follow the sensor, false to leave the route where it is.