My Bluetooth headset (Parrot B350-XT) has 4 buttons:
- Volume Up
- Volume Down
- Power button
- “Parrot” button
I am creating an Android application (OS 4.4.2) running on Samsung’s SM-T230NU.
I would like my application to be able to receive notification when any of the above 4 buttons are pressed including the type of button press (long press, short press). My application will interpret these events in context. The application I am developing is a softphone and I would like the following hook up between button events and softphone actions. This is just
- User presses vol down. Action: volume is decreased
- User presses vol up. Action: volume is increased
- User presses ‘parrot’ button while there are no calls active. Application is brought to foreground
- If an inbound call happens and user presses ‘parrot’ button, then call is answered
- If an inbound call is active and user presses ‘parrot’ button, then call is hung up
So far I’ve looked through Android SDK, stackoverflow posts and various implementations but I haven’t been able to figure out how it should be done.