I would like to detect when user unplug his earphones. It seems we can do this by using the audio route related functions as AudioSessionAddPropertyListener.
I have a question though:
- Is it possible to use this both when application is open or running in background?
- If yes, what happens if the user keeps the application running in background for a long time? Will I still be able to detect when user removes his earphones?