how to connect android device to other device using bluetooth?
<p>I want to know the connectivity from one device to other device</p>

<pre><code> private static final UUID MY_UUID_SECURE =UUID.fromString("fa87c0d0-afac-11de-8a39-0800200c9a66");

   BluetoothSocket socket=device.createRfcommSocketToServiceRecord(MY_UUID_SECURE);
                                    BluetoothServerSocket bss=mBluetoothAdapter.listenUsingRfcommWithServiceRecord("BluetoothChatInsecure",MY_UUID_SECURE);
                                    socket.connect();
                                    bss.accept();
</code></pre>

<p>i know about using the predefined coding that is using intent, but i want through the above logic please any one help me.</p>

<pre><code>Intent intent = new Intent();  
                    intent.setAction(Intent.ACTION_SEND);  
                    intent.setType("*/*");  
                    intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(f));  
                    startActivity(intent);
</code></pre>
