- How to detect if a bluetooth headset plugged or not IOS 8?
- Pair a Bluetooth device in Windows
- Turn on Bluetooth
- To pair a Bluetooth device
- To pair a Bluetooth printer or scanner
- To pair a Bluetooth device using Swift Pair
- Turn on Bluetooth
- To pair a Bluetooth headset, speaker, or other audio device
- To pair a Bluetooth keyboard, mouse, or other device
- To pair a Bluetooth printer or scanner
- To pair a Bluetooth device using Swift Pair
- Related topics
- How to Set Up a Bluetooth Device on a PC
- In This Article
- What to Know
- How to Connect Wireless Input Devices
- How to Connect a Headset, Speaker, or Other Audio Device
- How to Connect Devices to PCs Without Built-In Bluetooth Capabilities
How to detect if a bluetooth headset plugged or not IOS 8?
In my project, I use AVAudioSession to detect any headphone is plugged or unplugged. But in this case, I can’t detect when bluetooth device is plugged. Here is my code for headphone state.
- (void)audioRouteChangeListenerCallback:(NSNotification*)notification < NSDictionary *interuptionDict = notification.userInfo; NSInteger routeChangeReason = [[interuptionDict valueForKey:AVAudioSessionRouteChangeReasonKey] integerValue]; switch (routeChangeReason) < case AVAudioSessionRouteChangeReasonNewDeviceAvailable: //NSLog(@"AVAudioSessionRouteChangeReasonNewDeviceAvailable"); NSLog(@"Headphone/Line plugged in"); [_soundButtonOutlet setImage:[UIImage imageNamed:@"sound-on.png"] forState:UIControlStateNormal]; _headSetState=YES; break; case AVAudioSessionRouteChangeReasonOldDeviceUnavailable: NSLog(@"AVAudioSessionRouteChangeReasonOldDeviceUnavailable"); NSLog(@"Headphone/Line was pulled. Stopping player. "); [_soundButtonOutlet setImage:[UIImage imageNamed:@"sound-off.png"] forState:UIControlStateNormal]; if(_isPlaying==YES) < [self.player pause]; [_audioButtonOutlet setImage:[UIImage imageNamed:@"play.png"] forState:UIControlStateNormal]; _isPlaying=NO; >_headSetState=NO; break; case AVAudioSessionRouteChangeReasonCategoryChange: // called at start - also when other audio wants to play NSLog(@"AVAudioSessionRouteChangeReasonCategoryChange"); break; > - (BOOL)isHeadsetPluggedIn < AVAudioSessionRouteDescription* route = [[AVAudioSession sharedInstance] currentRoute]; for (AVAudioSessionPortDescription* desc in [route outputs]) < if ([[desc portType] isEqualToString:AVAudioSessionPortHeadphones]) < [_soundButtonOutlet setImage:[UIImage imageNamed:@"sound-on.png"] forState:UIControlStateNormal]; _headSetState=YES; return YES; >else < [_soundButtonOutlet setImage:[UIImage imageNamed:@"sound-off.png"] forState:UIControlStateNormal]; _headSetState=NO; return NO; >> return NO; > > - viewWillAppear
Pair a Bluetooth device in Windows
You can pair all kinds of Bluetooth devices with your PC—including keyboards, mice, phones, speakers, and a whole lot more. To do this, your PC needs to have Bluetooth. Some PCs, such as laptops and tablets, have Bluetooth built in. If your PC doesn’t, you can plug a USB Bluetooth adapter into the USB port on your PC to get it.
Before you start, make sure that your Windows 11 PC supports Bluetooth. For more info on how to check, see Fix Bluetooth problems in Windows. If you need help adding a device without Bluetooth capabilities, see Add a device to a Windows PC.
Turn on Bluetooth
After you’ve checked that your Windows 11 PC supports Bluetooth, you’ll need to turn it on. Here’s how:
- In Settings: Select Start >Settings >Bluetooth & devices , and then turn on Bluetooth .
- In quick settings: To find the quick setting for Bluetooth, select the Network, Sound, or Battery icons ( ) next to the time and date on the right side of your taskbar. Select Bluetooth to turn it on. If it’s turned on without any Bluetooth devices connected, it might appear as Not connected .
To pair a Bluetooth device
- Turn on your Bluetooth device and make it discoverable. The way you make it discoverable depends on the device. Check the device or visit the manufacturer’s website to learn how.
- On your PC, select the Network , Sound, or Battery icons ( ) next to the time and date on the right side of your taskbar.
- Select Manage Bluetooth devices on the Bluetooth quick setting, then select your device under New devices.
Your Bluetooth device and PC will usually automatically connect anytime the two devices are in range of each other with Bluetooth turned on.
Tip: If you don’t see the Bluetooth device you want displayed in the list, you may need to set the Bluetooth devices discovery setting to Advanced. To learn how, see Fix Bluetooth problems in Windows.
To pair a Bluetooth printer or scanner
- Turn on your Bluetooth printer or scanner and make it discoverable. The way you make it discoverable depends on the device. Check the device or visit the manufacturer’s website to learn how.
- Select Start >Settings >Bluetooth & devices >Printers & scanners >Add device. Wait for it to find nearby printers, choose the one you want to use, then select Add device.
If you’re having problems installing your printer or scanner, see either Fix printer problems or Install and use a scanner in Windows.
To pair a Bluetooth device using Swift Pair
Swift Pair in Windows 11 lets you quickly pair a supported Bluetooth device with your PC. If the Bluetooth device supports Swift Pair, you’ll receive a notification when it’s nearby and you put it into pairing mode to make it discoverable.
- Turn on a Bluetooth device that supports Swift Pair and make it discoverable. The way you make it discoverable depends on the device. Check the device or visit the manufacturer’s website to learn more.
- If this is your first time using Swift Pair, select Yes when asked if you want to get notifications and use Swift Pair.
- When a notification appears that a new Bluetooth device was found, select Connect.
Before you start, make sure that your Windows 10 PC supports Bluetooth. For more info on how to check, see Fix Bluetooth problems in Windows 10. If you need help adding a device without Bluetooth capabilities, see Add a device to a Windows 10 PC.
Turn on Bluetooth
After you’ve checked that your Windows 10 PC supports Bluetooth, you’ll need to turn it on. Here’s how:
In Settings: Select Start > Settings > Devices > Bluetooth & other devices, and turn on Bluetooth.
In action center: Action center can be found next to time and date on your taskbar. On the taskbar, select action center ( or ), then select Bluetooth to turn it on. If it’s turned off, it might appear as Not connected.
If you don’t see Bluetooth in your action center, here’s how you can change it:
- Expand quick actions. On the taskbar, select action center ( or ) >Expand. Bluetooth should appear here. It will appear as Bluetooth or Not connected.
- Add Bluetooth to action center. Select Start >Settings >System >Notifications & actions >Quick actions. Go to Add or remove quick actions and turn on Bluetooth.
Note: For more info about how to change the apps and settings that appear in action center, see Change notification and action settings in Windows 10.
To pair a Bluetooth headset, speaker, or other audio device
- Turn on your Bluetooth audio device and make it discoverable. The way you make it discoverable depends on the device. Check the device or visit the manufacturer’s website to learn how.
- On your PC, select Start >Settings >Devices >Bluetooth & other devices >Add Bluetooth or other device >Bluetooth. Choose the device and follow additional instructions if they appear, then select Done. Your Bluetooth device and PC will usually automatically connect anytime the two devices are in range of each other with Bluetooth turned on.
To pair a Bluetooth keyboard, mouse, or other device
- Turn on your Bluetooth keyboard, mouse, or other device and make it discoverable. The way you make it discoverable depends on the device. Check the device or visit the manufactur’s website to learn how.
- On your PC, select Start >Settings >Devices >Bluetooth & other devices >Add Bluetooth or other device >Bluetooth. Choose the device and follow additional instructions if they appear, then select Done.
To pair a Bluetooth printer or scanner
- Turn on your Bluetooth printer or scanner and make it discoverable. The way you make it discoverable depends on the device. Check the device or visit the manufacturer’s website to learn how.
- Select Start >Settings >Devices >Printers & scanners >Add a printer or scanner. Wait for it to find nearby printers, then choose the one you want to use and select Add device.
If you’re having installation issues with your printer or scanner, see either Fix printer problems or Install and use a scanner in Windows 10.
To pair a Bluetooth device using Swift Pair
Swift Pair in Windows 10 lets you quickly pair a supported Bluetooth device with your PC. If the Bluetooth device supports Swift Pair, you’ll receive a notification when it’s nearby and you put it into pairing mode to make it discoverable.
- Turn on a Bluetooth device that supports Swift Pair and make it discoverable. The way you make it discoverable depends on the device. Check the device or visit the manufacturer’s website to learn more.
- If this is your first time using Swift Pair, select Yes when asked if you want to get notifications and use Swift Pair.
- When a notification appears that a new Bluetooth device was found, select Connect.
- After it’s connected, select Close.
Tip: If you’re a small business owner looking for more information on how to get Microsoft 365 set up, visit Small business help & learning.
Related topics
How to Set Up a Bluetooth Device on a PC
Lisa Johnston is a former Lifewire writer and an editor who covers computer peripherals and other consumer electronics since 2004.
In This Article
What to Know
- Turn on the Bluetooth device. On the PC select Start >Settings >Devices >Bluetooth & other devices.
- Next, turn on the Bluetooth toggle. Select Add Bluetooth or other device.
- In the Add a device window, select Bluetooth and choose your device from those displayed.
This article explains how to connect Bluetooth devices to computers with or without built-in Bluetooth capabilities. Instructions apply to Windows 10, 8.1, and 7.
How to Connect Wireless Input Devices
Most modern laptops and computers come with built-in Bluetooth capabilities. Because of this, you can use all sorts of wireless speakers, headphones, fitness trackers, keyboards, trackpads, and mice with your PC. The pairing process differs depending on what you connect to your PC.
To connect a wireless keyboard, mouse, or similar device to your PC, follow these steps:
On the PC, select Start.
Select Settings.
Choose Devices.
Select Bluetooth & other devices in the left pane.
Turn on Bluetooth, if it isn’t toggled on.
Select Add Bluetooth or other device.
In the Add a device window, select Bluetooth.
How to Connect a Headset, Speaker, or Other Audio Device
The way you make audio devices discoverable varies. Check the documentation that came with the device or at the manufacturer’s website for specific instructions.
Turn on the Bluetooth headset, speaker, or other audio device and make it discoverable by following the manufacturer’s instructions.
On the PC’s taskbar, select Action Center >Connect to turn on Bluetooth on the PC if it isn’t on.
After the device is paired with the PC, it usually reconnects automatically when the two devices are in the range of each other, assuming Bluetooth is turned on.
How to Connect Devices to PCs Without Built-In Bluetooth Capabilities
Laptops haven’t always come Bluetooth-ready. Computers without built-in Bluetooth capabilities interact with Bluetooth wireless devices with the help of a small receiver that plugs into a USB port on the computer.
Some Bluetooth devices ship with receivers that you plug into the laptop. Still, many wireless devices don’t come with a receiver. To use this, you’ll need to buy a Bluetooth receiver for your computer. Most electronics retailers carry this inexpensive item.
Select the Bluetooth devices icon in the lower-right corner of the taskbar. If the icon doesn’t appear automatically, select the upward-pointing arrow to reveal the Bluetooth symbol.
Select Add a Bluetooth Device. The computer searches for discoverable devices.