public void run() { // Log.i(BFVService.TAG, "BEGIN mConnectedThread"); String line = null; while (true) { try { // Read from the InputStream line = mmReader.readLine(); this.handleLine(line); } catch (IOException e) { Log.d(BFVService.TAG, "disconnected", e); service.connectionLost(); break; } } }