The problem is not to send a pause message to Mediaplayer, but to catch the signal emitted when the button on the headset is pressed.