I do not understand what UUID Bluetooth means. Do UUIDs mean protocols (e.g. RFCOMM )? If so, why do the createRfcommSocketToServiceRecord() methods require a UUID when they specify rfcomm directly in their names? Why does the BluetoothChat code code have a seemingly arbitrary, hard-coded UUID?
My question arises because, on this issue , I get a null pointer exception when devices running 4.0.4 try to connect (to an external, -android device) using reflection. However, resolving this issue does not work for me. UUID muuid = device.getUuids()[0].getUuid(); raises an exception.
Change I solved this problem by hard-coding the UUID for the Serial Port service according to this answer (using UUID.fromString("00001101-0000-1000-8000-00805f9b34fb"); ).
I am also puzzled by why I need to provide a UUID for creating an insecure rfcomm socket using createInsecureRfcommSocketToServiceRecord(), , but not using the reflection method.
Can anyone straighten me?
android uuid bluetooth rfcomm
ForeverWintr Dec 20 '12 at 2:21 2012-12-20 02:21
source share