Android: getBluetoothService () wird ohne BluetoothManagerCallback aufgerufen
Ich versuche mein Nexus 4 mit einem Wii Balance Board zu verbinden, bekomme aber folgende Fehlermeldung:
getBluetoothService() called with no BluetoothManagerCallback
connect(), SocketState: INIT, mPfd: null
Die Verbindung wird also nicht beendet.
Meine Steckdose:
public final class wSocket
{
public static BluetoothSocket create(BluetoothDevice dev, int port)
{
try {
/*
* BluetoothSocket(int type, int fd, boolean auth, boolean encrypt, BluetoothDevice device, int port, ParcelUuid uuid)
*/
Constructor<BluetoothSocket> construct = BluetoothSocket.class.getDeclaredConstructor(int.class, int.class, boolean.class,
boolean.class, BluetoothDevice.class, int.class, ParcelUuid.class);
construct.setAccessible(true);
return construct.newInstance(3 /* TYPE_L2CAP */, -1, false, false, dev, port, null);
} catch (Exception ex) {
return null;
}
}
}
Wo gibt es mir den Fehler:
private BluetoothSocket sk;
...
sk = wSocket.create(wm.dev, 0x11);
...
sk.connect();
Ich habe diesen Link ohne Erfolg überprüft, weil ich gerade 1 Socket geöffnet habe:getbluetoothservice () wird ohne bluetoothmanagercallback aufgerufen
Irgendeine Hilfe oder Idee zum Erkunden?