hfp

How can I detect whether an HFP or A2DP is connected in iOS?

ぐ巨炮叔叔 提交于 2020-08-07 08:03:51
问题 I am working on a project which can play music via HFP device. But here's a problem that I want to detect whether an HFP or A2DP is connected when music is playing. Now I am using the AVFoundation framework to do this. Here's the code: - (BOOL)isConnectedToBluetoothPeripheral { BOOL isMatch = NO; NSString* categoryString = [AVAudioSession sharedInstance].category; AVAudioSessionCategoryOptions categoryOptions = [AVAudioSession sharedInstance].categoryOptions; if ((![categoryString

How to make a VOIP app use a carkit like the native call app?

走远了吗. 提交于 2019-12-11 04:15:48
问题 I've been searching for over a week now with no clear solutions. We are building an ap that can make VOIP calls. The current implementation uses AudioManager.requestAudioFocus to tunnel a voice call over a bluetooth headset or carkit, and can uses the AudioManager state to accept incomming calls or hangup ongoing calls when the accept/hangup button on a headset is pressed. This all works fine. However, when connected with a carkit that has both an accept and hangup button, the current

Android communicating to HFP device via AT commands

感情迁移 提交于 2019-12-07 04:10:02
问题 im trying to control a bluetooth bracelet with vibration function via HFP (hands free profile) in Android. I've been able to connect to the bracelet and access the input- and outputstream. My goal is to simulate an incoming call so that the bluetooth bracelet starts vibrating (which seems to be the only way to do that). To do this, im using AT commands. In the bluetooth specs at https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=238193 on page 22 you can see the handshake to

Bluetooth hands free client volume control

孤街醉人 提交于 2019-12-03 06:26:12
问题 I have an android device acting as a hands free client device using hfp. Using the following code: I am able to receive a call and the speakers and mic are working as expected. My problem is that I can't seem to control the volume. I tried using the following lines of code to find the correct stream, but none of them seem to work. I tracked the volume command being sent from the phone to the client in the class HeadsetClientStateMachine , line #1822 in the following link:

Bluetooth hands free client volume control

99封情书 提交于 2019-12-02 19:53:25
I have an android device acting as a hands free client device using hfp. Using the following code: I am able to receive a call and the speakers and mic are working as expected. My problem is that I can't seem to control the volume. I tried using the following lines of code to find the correct stream, but none of them seem to work. I tracked the volume command being sent from the phone to the client in the class HeadsetClientStateMachine , line #1822 in the following link: HeadsetClientStateMachine from lolipop case EVENT_TYPE_VOLUME_CHANGED: if (event.valueInt == HeadsetClientHalConstants