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();
+ handler.obtainMessage(TelemetryService.MSG_CONNECTED).sendToTarget();
+
// Notify other waiting threads, now that we're connected
AltosBluetooth.this.notifyAll();
private void connection_failed() {
if (D) Log.e(TAG, "Bluetooth Socket IO failed!");
}
-
+
public void print(String data) {
byte[] bytes = data.getBytes();
if (D) Log.i(TAG, "print(): begin");
}
return AltosLink.ERROR;
}
-
+
public void close() {
if (D) Log.i(TAG, "close(): begin");
synchronized(this) {