import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
+import android.os.Bundle;
import android.os.Handler;
+import android.os.Message;
import android.util.Log;
import org.altusmetrum.AltosLib.*;
// Reset the ConnectThread because we're done
connect_thread = null;
+ // Send the device name back to the Telemetry Service
+ name = device.getName();
+ Message msg = handler.obtainMessage(TelemetryService.MSG_CONNECTED);
+ Bundle b = new Bundle();
+ b.putString(TelemetryService.KEY_DEVNAME, name);
+ msg.setData(b);
+ handler.sendMessage(msg);
+
// Notify other waiting threads, now that we're connected
AltosBluetooth.this.notifyAll();