I want to initialize BluetoothDevice object with known mac address but, I do not know how to initialize.
Please guide me how to initialize the below object with the mac address 00:11:22:33:44, I would be very thankful for your kind response.
BluetoothDevice device;
Lets assume that String address = "00:11:22:33:44";
final BluetoothManager bluetoothManager =
(BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
mBluetoothAdapter = bluetoothManager.getAdapter();
BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);
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