Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

manOtunes

macrumors newbie
Original poster
Feb 22, 2010
4
0
Hello,

I'm currently working on an app for iPhone, Blackberry and Android, but for now, I'm just inquiring about iPhone. (FYI, I'm an ideas guy; not an actual programmer, so please don't use too many syllables)

I desperately need the ability to incorporate the physical button from the iPhone headphones, into my app. So that, while my app is running, if the user clicks and holds the button for a designated amount of time, it triggers a specific function in my app. (as opposed to the functions it currently triggers in the apple API)

As you're aware, the button currently triggers functions within the standard iPhone API. Is it possible, within a third party app, for the app to utilize that button for its own purposes?

(If not, I must say that's incredibly infuriating and slightly fascistic, for a perfectly usable and highly useful external button to be in all the user's pockets, yet developers have no access to it)

Or, if it is impossible to use the headphones-button to launch a function in a 3rd party app, is it at least possible to purchase some sort of third party (or apple) physical button which can be incorporated into an app?

Hopefully I've been clear. In other words, is there a physical, external button product on the market which somehow connects to the iPhone, (perhaps via bluetooth) which the user can clip to their belt, and while my app is running, this button triggers a function within my app, when pressed?

If any of you kind people can help me with this urgent question, you will literally save my app.

Thanks so much in advance!!!!!

man'Otunes
 
No. The Home Button cannot be used by an app in any way.

You could develop and have manufactured some sort of external accessory that plugs into the Dock Connector that your app could talk to. To do this you need to talk to Apple: you would need to join the Made for iPod/Works with iPhone programs.

I would note that in general this is not the way that iPhone apps work and is pretty much against the iPhone HCI Guide.
 
looking to use either the headphones button or external accessory

That's right. I'm aware that it isn't possible to program the Home button. I'm looking to either program the button which is attached to the headphones, or for a low cost physical button which connects via bluetooth.

I'm looking to make it so, when the user presses the button while my app is running, the button triggers a function inside my app.

Does anyone know where I can look for such a product?
 
That's right. I'm aware that it isn't possible to program the Home button. I'm looking to either program the button which is attached to the headphones, or for a low cost physical button which connects via bluetooth.

I'm looking to make it so, when the user presses the button while my app is running, the button triggers a function inside my app.

Does anyone know where I can look for such a product?

The buttons on supported headphones are not available to the application. Again any external accessory, whether connected via Bluetooth or via the Dock, would need to go through the program I linked to above.
 
off the shelf?

It seems way too ambitious for me to manufacture a dedicated accessory. I'm hoping that some third party company already exists, which created and sells already-approved bluetooth physical buttons, for use with iPhone.

Is there such a company already in existence?
 
It seems way too ambitious for me to manufacture a dedicated accessory. I'm hoping that some third party company already exists, which created and sells already-approved bluetooth physical buttons, for use with iPhone.

Is there such a company already in existence?

I have never heard of one. As I noted iPhone apps, if they are following the HCI (which you pretty much have to do to get approved for the store) are designed to not need such a thing.
 
Apple's accessories program is called MFI, Made For IPhone. Google 'made for iPhone' to see if you can find something relevant.
 
Try adding an audio session property listener for kAudioSessionProperty_CurrentHardwareOutputVolume and see what happens when you change the volume using the volume rocker.

There are a whole bunch of other properties mentioned in the audio session headers. Try listening to all of them and see if any of them trigger when you do something interesting.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.