headset

Is it possible to ignore plugged in Headset and still use phone speakers?

蹲街弑〆低调 提交于 2021-02-11 13:38:32
问题 I would like to use the Phone Speakers while a Headset is plugged-in, instead of the Headset-Speakers. Is it possible to do that? if yes, how can I achieve it? I'm developing an App in Java for Android 9 . Detection if Headset is Plugged in works so far: public class HeadsetIntentReceiver extends BroadcastReceiver { private String TAG = "HeadSet"; public HeadsetIntentReceiver() { Log.d(TAG, "Created"); } @Override public void onReceive(Context context, Intent intent) { if(intent.getAction()

How to handle AT commands from a Bluetooth headset in Android?

ぃ、小莉子 提交于 2020-06-16 05:04:11
问题 I would like to handle an AT command (for double tap event) from a standard Bluetooth mono headset. By default, the double tap sends AT+BLDN command (Redial event) to the phone. According to Android documentation, registering a Broadcast Receiver for android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT will handle all such vendor related AT commands. But, it is not being invoked when the AT command is sent by the headset. Though, the redial event happens on the phone. 回答1: AT+BLDN

How to handle AT commands from a Bluetooth headset in Android?

谁说我不能喝 提交于 2020-06-16 05:04:07
问题 I would like to handle an AT command (for double tap event) from a standard Bluetooth mono headset. By default, the double tap sends AT+BLDN command (Redial event) to the phone. According to Android documentation, registering a Broadcast Receiver for android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT will handle all such vendor related AT commands. But, it is not being invoked when the AT command is sent by the headset. Though, the redial event happens on the phone. 回答1: AT+BLDN

can not connect to bluetooth headset in android

≡放荡痞女 提交于 2020-04-21 08:14:18
问题 After steeping in the wrong path for almost two months i found out what my mistake was. Now i am pacing a new problem which I cannot find the answer to: Using this function while trying to connect to the headset: mBluetoothAdapter.getProfileProxy(context, mProfileListener, BluetoothProfile.HEADSET); final BluetoothProfile.ServiceListener mProfileListener = new BluetoothProfile.ServiceListener() { public void onServiceConnected(int profile, BluetoothProfile proxy) { if (profile ==

can not connect to bluetooth headset in android

隐身守侯 提交于 2020-04-21 08:12:25
问题 After steeping in the wrong path for almost two months i found out what my mistake was. Now i am pacing a new problem which I cannot find the answer to: Using this function while trying to connect to the headset: mBluetoothAdapter.getProfileProxy(context, mProfileListener, BluetoothProfile.HEADSET); final BluetoothProfile.ServiceListener mProfileListener = new BluetoothProfile.ServiceListener() { public void onServiceConnected(int profile, BluetoothProfile proxy) { if (profile ==

How to make Android phone as a bluetooth headset?

半腔热情 提交于 2020-01-20 14:21:23
问题 Yes, I know Android has already implemented the Bluetooth Headset Profile, but it is in Audio Gateway Role, not in HeadSet Role. What I want to do is develop an application on Android phone which will act as a bluetooth headset, so it can connect to my laptop by bluetooth. When I try to call somebody, I can use my phone to dial him, and my application will forward the voice through bluetooth to my laptop, and one other application running on laptop will get the voice data and forward them to

remoteControlReceived(with event: UIEvent?) Doesn't triggered

*爱你&永不变心* 提交于 2020-01-07 04:41:08
问题 I have audio recording/playing app. But I want to pause playing, when user uses play/pause button on the regular wired iPhone headset. So i implemented handling of remote events: // MARK: Overrides internal extension AppDelegate { override func remoteControlReceived(with event: UIEvent?) { super.remoteControlReceived(with: event) /* some other logic */ } } Then I started receiving remote events in application: didFinishLaunchingWithOptions: : func application(_ application: UIApplication,

How to make call using Intent using Bluetooth headset

[亡魂溺海] 提交于 2020-01-06 19:37:42
问题 In my application I have to make call using Intent using Bluetooth Headset. Right now I am using below link. I used implementation from Using the Android RecognizerIntent with a bluetooth headset When calling dialog open Bluetooth Headset Connection going lost. Please help 来源: https://stackoverflow.com/questions/25462748/how-to-make-call-using-intent-using-bluetooth-headset

How to mute audio in headset but let it play on speaker programmatically?

孤街醉人 提交于 2019-12-28 04:21:08
问题 I am searching a work-around for my problem specified in this question: How to disable the wired headset programmatically in Java As mentioned there, I am getting audio in both my speakers and headphones. Can someone please tell me how to mute the audio in the headset programmatically , while letting it play undiminished on speaker? 回答1: AudioManager am = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE); am.setMode(AudioManager.MODE_IN_CALL); am.setSpeakerphoneOn(true); And then

Doing something if it detects that headphones are plugged in

岁酱吖の 提交于 2019-12-25 03:16:18
问题 I'm wanting to make it so if headphones are plugged in the device something happens such as a notification icon appears. (I already have the notification icon stuff done) But I can't seem to find a way to make it happen. I'm wanting something like this if headphones_plugged_in { do this } I found this online AudioManager.isWiredHeadsetOn() I just don't know how I would use that. I already added the right permissions in the manifest too! If you could guide me or link me to something it would