Is there an event for when the headphones are unplugged?

Ben Clayton picture Ben Clayton · Dec 15, 2010 · Viewed 10k times · Source

During a test, a client noticed that video playback in the iPhone pauses when headphones are unplugged. He wanted similar functionality for audio playback, and maybe the ability to pop up a message.

Does anyone know if there's an event of some kind I could hook into to make this possible?

Answer

henklein picture henklein · Dec 15, 2010

See Responding to Route Changes from the Audio Session Programming Guide.