1

I know that AVRCP abilities were added to iOS 4.1 (in iPod application now you can forward and rewind songs by using hardware buttons on supporting headsets).

I am trying to find any API for using these abilities in a music application that I work on.

The requirement is to catch play/stop, forward and rewind buttons events from the headset.

Any information will be more than welcome.

Thank you.

3 Answers 3

2

I've been looking for something similar -- info on how to catch remote control events. If you have access to https://developer.apple.com, look up the UIEvent class and "Remote Control of Multimedia" in the "Event Handling Guide for iOS" doc. There are events for all the presses you need.

This will help ONLY IF iOS abstracts remote events for you so it is just a "remote event" regardless of whether it is wired or bluetooth. I don't have the hardware to try this yet.

If you're trying to get low level access to the bluetooth drivers yourself I think you're out of luck.

Hope this helps...

0

My guess is that as long as you register and listen for these events (although I am not aware of the syntax for that in iOS) your application should get these events.

The system will normally take care to route the events to your application and it will not matter if it is generated locally (via local action) or remotely from a bluetooth AVRCP control device.

Hope this helps.

1
  • Thank you @Dennis, but I don't think it will work for me. There are few ways to play audio in iOS. One of the ways is to use an audio player that takes the full control of the UI/screen. I believe that this approach will receive the BT events. I use much lower level approach. Actually, I have few different players in the app. In addition I want to give these buttons some additional functionality (2 presses on FF will do some additional action etc.). Oct 30, 2010 at 21:48
0

Here's a direct link to Apple's documentation mentioned above:

http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/RemoteControl/RemoteControl.html

At launch, register to receive events
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];

Then implement (void)remoteControlReceivedWithEvent:(UIEvent *)receivedEvent to deal with the events.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.