问题
Is there an API for Windows Phone 8 which allows to receive headset events, such as when a user presses the play/stop button? I would be interested in these events to react in my application accordingly.
Regards,
回答1:
If you are in control of the audio/video on the device at this point (via MediaElement
or BackgroundAudioPlayer
), then play/pause events will be raised in your code via MediaElement
or BackgroundAudioPlayer
.
If you are not in control of the audio/video, then it is not possible to capture these events.
来源:https://stackoverflow.com/questions/17607626/windows-phone-8-api-for-headset-control-events