Search code examples
iosobjective-cavaudioplayer

How to detect Proximity Sensor?


how to detect whether the user hear this audio in proximity or not?


Solution

  • First detect state of Proximity Sensor using iPhone Proximity Sensor and then play audio using phone call speaker Play audio through upper (phone call) speaker