reform from the Android BluetoothChat Demo.