0

Some time ago I started developing to Android.

I'm trying to create a BluetoothServerSocket.

I have this code:

tmp = mBluetoothAdapter.listenUsingRfcommWithServiceRecord(NAME, MY_UUID);

NAME is the name of my server (I can give here what i want) or not?

And I don't known what is MY_UUID. Where can I get MY_UUID from?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
mitroh
  • 1

1 Answers1

0

You can get the UUID by utilizing the getUuids() method of the BluetoothDevice class. See this excellent thread that describes this very process, along with examples and the resulting output:

Android - Get Bluetooth UUID for this device

Community
  • 1
  • 1
Willis
  • 5,308
  • 3
  • 32
  • 61