Jafuentes
Jafuentes

Reputation: 365

Use call button bluetooth headset to launch my application

I´ve bought a Bluetooth headset (MOTOROLA HK200) with the intention to use the call button in a push to talk application. This way, with my application running, when I push the headset call button I want to start capturing and sending audio. However, when I push the call button for a long period of time, a new call is directly launched and Android prompts a dialog to choose the application I want to use to make the call (which is not what I want). I've already achieved something similar with a wired headset by capturing the event ACTION_MEDIA_BUTTON (1) but I don't get the same result with the Bluetooth headset call button.

I've been looking examples for a long time but I haven't found the solution.

Thanks for your help,

Upvotes: 2

Views: 1221

Answers (1)

ashish
ashish

Reputation: 1381

Pressing headset for a long time issues a AT command to phone to redial the last number. I think its calls the BluetoothHandsfree.redial()(in packages/apps/Phone) method to call last call which is called when phone receives BLDN command(or maybe another AT command).

Upvotes: 1

Related Questions