Android蓝牙hfp开发,Bluetooth HFP support for Android App with SIP/VoIP

本文探讨了如何在Android应用中集成蓝牙设备以支持SIP/VoIP电话功能,重点介绍了接听和结束通话的功能实现。作者尝试了多种方法,包括监听AUDIO_STATE_CHANGED广播、使用BluetoothAdapter类和绑定到IBluetoothHeadsetPhone接口等。
摘要由CSDN通过智能技术生成

I am trying to add support for bluetooth devices like headsets/headphones/car stereo to my android app which allows user to make SIP/VoIP calls. I am trying to mostly address the requirements of Answering and Ending of calls using button on bluetooth headsets, other buttons/features handling is good to have.

With the search I have done and all the text I have read so far, I have come across the following-

One common way suggested everywhere is registering to ACTION_AUDIO_STATE_CHANGED. But this doesn't really helps me. Intents for it are sent every time the button on Bluetooth headset is pressed And also when we start the ring tone on bluetooth headset.

A very common solution I found was use of Bluetooth Adapter class. There isn't much you could do with it. So again not helpful.

Another approach I came across is the use of Vendor specific headset events. After some efforts I was able to get this working for specific Plantronics Bluetooth headsets. Supporting Jabra is important.

One more approach I came across is binding with IBluetoothHeadsetPhone.aidl, the way the phone app does it. I could find very little information on it, not enough to go ahead and implement any thing.

If anyone has done such things, I think the problem I am facing is not an uncommon one, I just believe it is not documented well.

Any pointer, approach, link would be appreciated.

I will try to add more info as I find any or any other approaches I try. Please ask for details if you need any more on the solutions I have tried. And please suggest changes instead of just flagging the question.

Thanks in adv.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值