Does android 5.0 support HFP client (act as Headfree client devices by Bluetooth)??

2,915 views
Skip to first unread message

Yong Ma

unread,
Mar 27, 2015, 10:25:11 AM3/27/15
to android-...@googlegroups.com

Dear all,

    I found a config value in packages/app/Bluetooth/res/values/config.xml  and a hide class
  1. <bool name="profile_supported_hfpclient">false</bool>
  2. android.bluetooth.BluetoothHeadsetClient, this provides HFP client API, such as dial, accept call.

    I set profile_supported_hfpclient to true, and remake and flash the system.  I write a test app to  using BluetoothHeadsetClient API, and it can dial and accept call. However, the voice is not working when calling. The speaker doesn't make sound, and the voice received by mic  isn't transferred by Bluetooth SCO.

    So does android support HFP client fully? How can I make voice works well??

        

cbh...@gmail.com

unread,
Oct 29, 2015, 9:53:31 AM10/29/15
to android-platform
Hi,

I am currently porting hfp client from android 5.1.1 back to android 4.2.2, and I have successfully added and modified the needed source files related to the bluetooth hfp client. Just like you, it can dial, accept and terminate calls, but I can hear no voice during calling. Maybe the audio part needs porting too...

So have you find a solution to the 'no sound when calling' problem? If yes, can you share the solution with me?

Thanks!

Thomas Trummer

unread,
Jan 3, 2016, 9:34:53 PM1/3/16
to android-platform
Hi,

I am currently also trying to enable the A2DP Sink and the HFP Client. Currently the A2DP Sink is working and I can also connect to the HFP Client but if I make a call or if I execute connectAudio audio stops working.
So the problem maybe someting about the SCO connection (used by HFP) because A2DP is working.

Is there already a solution?
Please share your solutions if you found something out.

Thanks!

vishak...@quest-global.com

unread,
Jan 4, 2016, 10:50:34 AM1/4/16
to android-platform
Hi,

Could you please tell me the steps followed? I googled a lot but no proper documentation is found.

Regards,
Vishak

taro pepper

unread,
Apr 13, 2016, 2:36:33 PM4/13/16
to android-platform

 Dear Sir,

 I am totally new to the app development and just started to learn how to create it, but would like to create HFP client app
 (Control In/Outbound call and get call history from paired device).

 I just found your thread and am eager to dial / accept call using the hfpclient.
 I have read through all the documents of BluetoothHeadsetClient and Android developer page, but I could not quite get how to control it.
 So I tried to find out the xml file you mention in this thread < packages/app/Bluetooth/res/values/config.xml> but I am unable to find out.
 Is it inaccessible for un-rooted user?
 Or is it at somewhere inside the Android Studio ?
 
I am using;
Android Studio Ver. 1.5.1
Device : Un-rooted Xperia Z3  with Android OS : 5.0.2

I know this thread is passed over 1 year but hope to get some answer from you guys.

I apologize for interrupting you for my ignorance in advance.

Regards,

2015年3月27日金曜日 23時25分11秒 UTC+9 Yong Ma:

BILHEUDE Emmanuel

unread,
Apr 14, 2016, 1:37:45 PM4/14/16
to android-platform
Hy,

By default, Android cannot act as HFP Client. This functionnality is not compiled in the ROM.
Sorry, but I think you won't be able to use the HFP Client API on a standard phone without a custom ROM.
Morover, you will need to do some changes in the sound driver and the bluetooth stack to be able to act as an HFP Client.

Regards

ty...@cronologics.com

unread,
Aug 30, 2016, 8:05:11 PM8/30/16
to android-platform
Hi Thomas!

I have also got HFP client working on Lollipop, but for some reason I can't hang up calls. terminateCall() doesn't work with iPhones because its part of the Extended Call Control spec, which iPhone doesn't support. And it doesn't seem like there's any way to just send a normal hang up command. Did you encounter this?

-Tyler

buba chelidze

unread,
Feb 1, 2017, 10:02:03 AM2/1/17
to android-platform
Can you hear a sound after you accept call ? Could you share what have you changed in ROM ? 

Thanks . 

Lisong Wang

unread,
Feb 17, 2017, 10:55:25 AM2/17/17
to android-platform
I have the same problem, that was A2DP sink work well and no sound in HFP client.
Have you got the solution for this issue?

在 2015年3月27日星期五 UTC+8下午10:25:11,Yong Ma写道:

atkonline

unread,
Jul 25, 2017, 11:38:04 AM7/25/17
to android-platform
We are facing the same problem , We are using a Nexus shamu device running on Noughat. Enabled the A2DP sink and HFP client in the config.xml and AUDIO_FEATURE_ENABLED_HFP in the device specific mk file but sstill no sound while attending calls through HFP. Any help will be appreciated

wke...@gmail.com

unread,
Jan 11, 2018, 10:37:36 AM1/11/18
to android-platform

Hello, I just studied Bluetooth development, also need to do a app to answer, refused to answer the phone, I can not obtain BluetoothHeadsetClient. Can you show me how you get Bluetooth headset client?

Thank you very much.


在 2017年7月25日星期二 UTC+8下午11:38:04,atkonline写道:

Jayantakumar Singh Konjengbam

unread,
Feb 6, 2018, 2:42:14 PM2/6/18
to android-...@googlegroups.com

A2DP works on SBC codec (as of classic Bluetooth, can support MP3, AAC also based on your implementations), whereas HFP/Headset works on SCO backed by PCM audio channel.

 

-Jayanta

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To post to this group, send email to android-...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.


This e-mail is confidential and is intended solely for the use of the addressee(s). Content is not to be relied upon by any person other than the addressee(s), without prior written approval of SOTI. If you are not the intended recipient, please notify us immediately, destroy any copies and delete from your computer systems. If you have received this e-mail in error, any use, disclosure, dissemination, forwarding, printing or copying is strictly prohibited. Although this email and any attachments are believed to be free of any virus or other defects which might affect any computer or IT system into which they are received, no responsibility is accepted by SOTI for any loss or damage arising in any way from the receipt or use therein.

Alex Kotovskiy

unread,
Jun 19, 2018, 4:04:12 PM6/19/18
to android-platform

Hi, did you port the a2dp profile too? I`m trying to port a2dp sink to 4.2.2 can you share the result?

четверг, 29 октября 2015 г., 15:53:31 UTC+2 пользователь cbh...@gmail.com написал:

Oindrila Banerjee

unread,
Sep 25, 2018, 1:28:26 PM9/25/18
to android-platform
Hi,

You say you enabled A2DP sink and it is working. Is this for Lollipop? Do I need to make only these changes?
i) In external/bluetooth/bluedroid/include/bt_target.h (false to true):

/* Enable bluetooth av sink. */

#define BTA_AV_SINK_INCLUDED  TRUE​
ii) platform/packages/apps/Bluetooth/res/values/config.xml (false to true):

<bool name="profile_supported_a2dp_sink">true</bool>

OR i have to make <bool name="profile_supported_a2dp">true</bool>  which is already true , false so that it works as only a2dp sink?

Oindrila Banerjee

unread,
Oct 4, 2018, 12:04:08 PM10/4/18
to android-platform
Hi,
You say you enabled A2DP sink and it is working. Is this for Lollipop? Do I need to make only these changes?
i) In external/bluetooth/bluedroid/include/bt_target.h (false to true):

/* Enable bluetooth av sink. */

#define BTA_AV_SINK_INCLUDED  TRUE​
ii) platform/packages/apps/Bluetooth/res/values/config.xml (false to true):

<bool name="profile_supported_a2dp_sink">true</bool>

OR i have to make <bool name="profile_supported_a2dp">true</bool>  which is already true , false so that it works as only a2dp sink?

On Friday, February 17, 2017 at 9:25:25 PM UTC+5:30, Lisong Wang wrote:
Reply all
Reply to author
Forward
0 new messages