Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Bluetooth multiple connection issue?

I am new in Android, I am working on a project where I have to connect My device with all devices which can be found in by startDiscovery() call Using Bluetooth. I have gone through with bluetooth chat sample, but issue is that for make connection I need to click on item of search-devices in the list, but I want to send data object on all the devices in the list.. is that possible with listenUsingInsecureComm..,? but I am not getting the way how to pair with other search devices without permission (that the receiving device dont need to click Yes for pairing)?

I also visited related question here but can't get my solution.

like image 686
Abdul Wahab Avatar asked Jul 29 '11 11:07

Abdul Wahab


1 Answers

I don't know exactly but according to Bluetooth chat code for making a more connection you have to make array of BluetoothDevice and also you have to manage separate threads for all connections. means you have to make array of threads for reading and writing data from remote devices and each thread will associated with only one device means for device 1 there is a thread1 and for device 2 there is a thread 2 and so on.

like image 181
Dharmendra Avatar answered Sep 19 '22 23:09

Dharmendra