public AcceptThread(BluetoothConnectionService service)
            {
                this.service = service;
                BluetoothServerSocket tmp = null;

                // create a listening server socket
                try
                {
                    tmp = service.bluetoothAdapter.ListenUsingInsecureRfcommWithServiceRecord(appName, MY_UUID_INSECURE);
                    Logger.Log("AcceptThread: Setting up Service using " + MY_UUID_INSECURE);
                }
                catch (IOException e)
                {
                    Logger.Log("AcceptThread: " + e.Message);
                }

                serverSocket = tmp;
            }
            public ConnectedThread(BluetoothConnectionService service, BluetoothSocket socket)
            {
                this.service = service;
                this.socket  = socket;

                Stream tmpIn  = null;
                Stream tmpOut = null;

                try
                {
                    tmpIn  = socket.InputStream;
                    tmpOut = socket.OutputStream;
                }
                catch (IOException e)
                {
                    Logger.Log(e.Message);
                    IsConnected = false;
                }

                inStream  = tmpIn;
                outStream = tmpOut;
            }
 public ConnectThread(BluetoothConnectionService service, BluetoothDevice dev, UUID uuid)
 {
     this.service       = service;
     service.device     = dev;
     service.deviceUUID = uuid;
 }