Java tutorial
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.util.UUID; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; public class Main { private static final UUID PRINTER_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"); public static BluetoothSocket getSocket(BluetoothDevice device) throws IOException { BluetoothSocket socket = device.createRfcommSocketToServiceRecord(PRINTER_UUID); socket.connect(); return socket; } }