I have an Android application that must connect to a bluetooth connected to an Arduino (Hc05) I managed to find the device and everything, however, in the Android library it says that we must connect the device and for that we must use a UUID, however , how can I know which is the correct UUID? In Arduino no UUID is needed, I just send the number via Print and it can transmit to Bluetooth.
try {
// Get a BluetoothSocket to connect with the given BluetoothDevice.
// MY_UUID is the app's UUID string, also used in the server code.
tmp = device.createRfcommSocketToServiceRecord(MY_UUID);
} catch (IOException e) {
Log.e(TAG, "Socket's create() method failed", e);
}
mmSocket = tmp;
}
Where i find this MY_UUID correct?
Source: Android Questions