Two bluetooth connections android

Multiple Bluetooth connections on Android

This article will show you how to make several Bluetooth connections on Android devices, because before buying a particular mobile device people are wondering whether they can pair multiple devices, and if so, how to implement it.

The problem

Most often, this question is asked by people who want to buy a tablet running Android, and they want to use it such as a full-fledged laptop. They want to perform multiple connections via Bluetooth on Android, connect a wireless keyboard and mouse, and in some cases the headset to communicate using 3G tablets. They want to make quite a comfortable working device. Therefore, the question arises, whether these devices will work together. Even if there is such an opportunity, people want to know if there will be enough bandwidth of the Bluetooth module of the tablet, if everything will work at the same time without glitches and delays. Next, we will try to give a few helpful tips on how and to what devices you can connect multiple devices via Bluetooth on Android to work comfortable.

Tips to connect

The mobile operating system from Google supports the work with several simultaneously connected gadgets, so there is no problem in the software part of the system. As for hardware, the multiple connection is supported from the version 1.2, so make sure that the device’s module meets this requirement.

How many Bluetooth devices can be connected to Android for everything to work smoothly? It depends on which version of the module is installed, because the older hardware version is, the higher is the bandwidth, and the more devices you can connect at the same time without glitches and delays. In 2015, almost all smartphones and tablets have modules with versions 4.0 and higher that support HID profile. Such a device allows working of 28 simultaneous interfaces without problems; we think that nobody needs more.

Note: all of the above refers only to peripheral devices. If you want to work directly with the two, for example, smartphones, even though you will be able to make simultaneous pairing, you will have to send and receive files only one by one. Parallel data transfer is not supported.

Instruction

To connect a new gadget to Android, perform the following steps:

  1. Go to the «Settings» in the menu of the device.
  2. Select «Bluetooth».
  3. Activate the wireless module by moving the slider in the top right corner of the display.
  4. Next, click the «Search», but previously activate the wireless gadget and enable the detection on it.
  5. Among the found devices, click on the name of the device you want to pair.
  6. In some cases, it is necessary to confirm a connection request, for example, when pairing with otherAndroidorWindowsdevice.
Читайте также:  Перезагрузить блютуз наушники jbl

You can connect the next gadget similarly to the step 3.

Multiple Bluetooth connections on Android: Video

[rBlock name=after_video return=1]

Источник

Как настроить несколько Bluetooth подключений на Android

Эта статья продемонстрирует вам, как произвести несколько Bluetooth подключений на Android девайсах: обычно перед покупкой того или иного мобильного аппарата люди задаются вопросом, смогут ли они сопрягать сразу несколько устройств к нему, и если да, то как это реализовать.

В чем может заключаться проблема

Bluetooth

Чаще всего такая функция интересует тех, кто решил приобрести планшет под управлением Android и хотел бы использовать его, например, как полноценный портативный компьютер, выполнив множественные соединения по Bluetooth на Android, подключив беспроводную клавиатуру с мышкой и, в некоторых случаях, гарнитуру для общения по мобильной связи в 3G планшетах, сделав себе таким образом вполне удобное рабочее устройство.

Вот и возникает закономерный вопрос, будет ли все это вкупе работать, и если даже такая возможность будет, хватит ли пропускной способности Bluetooth-модуля планшета, чтобы все работало одновременно и без задержек.

Далее мы постараемся дать немного полезных советов о том, как и к каким аппаратам можно подключить несколько устройств по Bluetooth на Android,чтобы работа была комфортной.

Советы по подключению

Сама по себе мобильная операционная система от Google поддерживает работу сразу с несколькими одновременно подключенными гаджетами, поэтому в программной части самой системы проблем быть не должно. Что касается аппаратной части, то множественная связка поддерживается с версии 1.2, так что убедитесь, что данный аппарат имеет модуль с версией не ниже упомянутой.

Сколько максимум Bluetooth-устройств можно подключить к Android, чтобы все работало гладко, зависит от того, какой версии установлен модуль, так как чем старше аппаратная версия, тем выше пропускная способность, и тем больше одновременно можно подключить устройств.

Практически все смартфоны с планшетами, выпущенные в 2015 году, имеют в себе модули не ниже 4.0 с поддержкой HID профиля: такая комплектация без проблем поддерживает 28 одновременных сопряжений, больше, думаем, вряд ли кому-то пригодится.

Читайте также:  Блютуз гарнитуры сони эриксон все

Примечание: все вышеописанное относится только к периферийным устройствам, если же вы хотите работать сразу с двумя, допустим, смартфонами, то хоть вы и сможете произвести одновременное сопряжение, но принимать и передавать файлы сможете только по очереди. Параллельная передача данных не поддерживается.

Инструкция

Для того чтобы присоединить новый гаджет к Android, выполните следующие действия:

Настройки

Выбираем Bluetooth

Активация

  • Далее нажмите на «Поиск», предварительно активировав беспроводной гаджет и выставив в нем режим обнаружения.

Поиск устройств

Подключение

  • В некоторых случаях нужно будет подтвердить запрос на подключение, например, при сопряжении с другим Android или Windows-девайсом.

Подтверждение

Следующий гаджет можно подключить аналогично, начиная с шага 3.

Как подключить Bluetooth гарнитуру к Android: Видео

Источник

How to connect 2 Bluetooth audio headsets to an Android phone?

How can two people listen to audio on an Android phone over Bluetooth? I.e. they have two Bluetooth headsets and want to pair both at the same time?

4 Answers 4

As in most things, it depends. In this case, since you do not state your device, I will demonstrate from mine, a Samsung 8, running Android 9 (One UI). It explicitly allows dual Bluetooth through settings. If this is your device, click through to it at

Settings > Connections > Bluetooth > Advanced > Dual Audio > ON

The setting allows sound to two different Bluetooth devices.

If your device is different, look for the capability along a similar setting path.

It seems available on Samsung S** devices but not on A** devices: eu.community.samsung.com/t5/galaxy-a-series/… Is there another option?

Most Android phones do not have the feature that allows more than one device to connect concurrently, but it’s probably possible to send audio to two Bluetooth devices with extra hardware.

If your phone has an audio jack, that signal can be split into two using an adapter. That would then have two wired headphones working. You could probably buy the wired splitter for $10 or so.

If your phone has an audio jack and would like to connect two Bluetooth devices, you can buy a multi-point Bluetooth Transmitter, also called Bluetooth transmitter splitter sender, which allows two devices to pair with it, and you connect the transmitter to the audio out jack of the phone. eBay has them for under $20.

If your phone doesn’t have an audio jack, There are many small, rechargeable Bluetooth receivers that can receive audio from your phone. They output on an audio jack, and you could proceed as above. If you need just audio, it would probably be fine, but if you want audio synced with a video you’re watching, there would probably be a latency issue with receiving and retransmitting the signal.

Читайте также:  Audio stream via bluetooth

It’s possible that some company has produced or will produce a single device that offers two Bluetooth connection points for a reasonable price, and that might even address the latency problem.

Источник

How to programmatically connect 2 android devices with bluetooth?

I am developing an application which should connect 2 Android devices through Bluetooth automatically. Let’s say they are already paired. Is it possible to achieve that?

On the downside, such an application, e.g. that is constantly paging to make a connection, will adversely affect the battery life. Not a good idea.

1 Answer 1

Of course it is possible. I’ll make a short tutorial out of the documentation:

Start with the BluetoothAdapter — it is your Bluetooth manager.

BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); 

If bluetoothAdapter is null, it means that this Android device does not support Bluetooth (It has no Bluetooth radio. Though I think it’s rare to encounter these devices. )

Next, make sure Bluetooth is on:

if (!bluetoothAdapter.isEnabled())

If it’s not on, we start the activity which asks the user to enable it.

Let’s say the user did enable (I guess you should check if he did, do it in your onActivityResult method). We can query for the paired devices:

Set pairedDevices = bluetoothAdapter.getBondedDevices(); 

Then loop over them: for(BluetoothDevice device : pairedDevices) and find the one you want to connect to.

Once you have found a device, create a socket to connect it:

BluetoothSocket socket = device.createRfcommSocketToServiceRecord(YOUR_UUID); 

YOUR_UUID is a UUID object containing a special ID of your app. Read about it here.

Now, attempt to connect (The device you are trying to connect to must have a socket created with the same UUID on listening mode):

connect() blocks your thread until a connection is established, or an error occurs — an exception will be thrown in this case. So you should call connect on a separate thread.

And there! You are connected to another device. Now get the input and output streams:

InputStream is = socket.getInputStream(); OutputStream os = socket.getOutputStream(); 

and you can begin sending/receiving data. Keep in mind that both actions (sending and receiving) are blocking so you should call these from separate threads.

Read more about this, and find out how to create the server (Here we’ve created a client) in the Bluetooth documentation.

Источник

Оцените статью
Adblock
detector