title: how to connect and send a message to multiple devices  through blue tooth in android?
body: <p>I would like to develop an application for sending a message to multiple devices through blue tooth.I know blue tooth is a point to point communication even though i would like to connect and send a message as following steps:</p>
  
  <p>1.Get the list of paired devices</p>
  
  <p>2.Select a device from paired list</p>
  
  <p>3.Connect to paired device , send a message to selected paired device</p>
  
  <p>4.Disconnect from device</p>
  
  <p>5.Get connection to another device and so on (one after another).</p>
  
  <p>I am getting paired devices addresses list as follows:</p>
  
  <pre><code>       mBtAdapter = BluetoothAdapter.getDefaultAdapter();
  
        Set&lt;BluetoothDevice&gt; pairedDevices = mBtAdapter.getBondedDevices();
  
  
      if (pairedDevices.size() &gt; 0) {
       for (BluetoothDevice device : pairedDevices) {
  
          pairedList.add(device.getAddress());
  
          }
  
       Log.v("11111111", "11111111111"+dev);
      }
  </code></pre>
  
  <p>I am trying to connect to them and sending a message when user clicks on a button as follows:</p>
  
  <pre><code>      ((Button)findViewById(R.id.button1)).setOnClickListener(new OnClickListener() {
  
      @Override
      public void onClick(View v) {
  
  
          String message = "Haiii";
  
          for(int i=0;i&lt;dev.size();i++){
              Log.v("device", "111111  :  "+pairedList.get(i));
          mbService.connect(mBtAdapter.getRemoteDevice(pairedList.get(i)));
  
                      mbService.write(message.getBytes());
  
                      mbService.stop();
          }
  
  
  
  
      }
  }); 
  </code></pre>
  
  <p>From the above code i am getting connection when loop pairedList.get(0).But the message is not sending to another device.In another device api sample application has installed.</p>
  
  <p>If I use pairedList.get(i) it is not connecting to any devices even single device also.</p>
  
  <p>please help me .</p>