P
Peter.Parker
Neues Mitglied
- 0
Hallo,
ich versuche gerade eine Bluetooth Schnittstelle herzustellen. Leider wird mir nichts angezeigt welche Geräte in der Nähe sind. Weiß jemand was ich falsch mache? Das ist mein Code:
public void suchen(View view) {
btAdapter.startDiscovery();
}
private final BroadcastReceiver receiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if(BluetoothDevice.ACTION_FOUND.equals(action)){
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
devices.add(device);
}
}
};
ich versuche gerade eine Bluetooth Schnittstelle herzustellen. Leider wird mir nichts angezeigt welche Geräte in der Nähe sind. Weiß jemand was ich falsch mache? Das ist mein Code:
public void suchen(View view) {
btAdapter.startDiscovery();
}
private final BroadcastReceiver receiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if(BluetoothDevice.ACTION_FOUND.equals(action)){
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
devices.add(device);
}
}
};