I currently have the following code that gives me a list of paired Bluetooth devices:
protected String[] getPairedDevices() { String[] listDevices; Set<BluetoothDevice> devices = btAdapter.getBondedDevices(); if (devices.size() <= 0) { Toast.makeText(this, "No Paired Bluetooth devices found.", Toast. LENGTH_LONG).show(); return null; } else { listDevices = new String[devices.size()]; int x = 0; for (BluetoothDevice device : devices) { String deviceName = device.getName(); String deviceAddress = device.getAddress(); listDevices[x] = deviceName + "\r\n" + deviceAddress; x++; } return listDevices; } } However, after I unpair a device, the unpaired device remains on the list of devices. Is there any way I can automatically remove the unpaired device from the list if a device is unpaired? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/cdd604ef-48d7-46dd-87d2-8fe5bed18952%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.