I am developing an app for android. Just a general questions as to , if is it possible to connect to a device which is non discoverable publicly?
Thanks in advance.
If you have previously paired with the device then it is possible to connect to it again even if it is not in discoverable mode. See this post: programmatically-connect-to-paired-bluetooth-device
// use paired devices or create a BluetoothDevice using a mac address
//Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
BluetoothAdapter myAdapter = BluetoothAdapter.getDefaultAdapter();
BluetoothDevice remoteDevice = myAdapter.getRemoteDevice("00:00:00:00:00:00");
BluetoothSockt btSocket = remoteDevice.createRfcommSocketToServiceRecord(UUID);
btSocket.connect();
//get input and output stream etc...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With