Android.Bluetooth.BluetoothDevice.CreateInsecureRfcommSocketToServiceRecord Method
Create an RFCOMM Android.Bluetooth.BluetoothSocket socket ready to start an insecure outgoing connection to this remote device using SDP lookup of uuid.

Syntax

[Android.Runtime.Register("createInsecureRfcommSocketToServiceRecord", "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothSocket;", "")]
public BluetoothSocket CreateInsecureRfcommSocketToServiceRecord (Java.Util.UUID p0)

Parameters

uuid
service record uuid to lookup RFCOMM channel

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.IO.IOExceptionon error, for example Bluetooth not available, or insufficient permissions

Remarks

Create an RFCOMM Android.Bluetooth.BluetoothSocket socket ready to start an insecure outgoing connection to this remote device using SDP lookup of uuid.

The communication channel will not have an authenticated link key i.e it will be subject to man-in-the-middle attacks. For Bluetooth 2.1 devices, the link key will be encrypted, as encryption is mandatory. For legacy devices (pre Bluetooth 2.1 devices) the link key will be not be encrypted. Use BluetoothDevice.CreateRfcommSocketToServiceRecord(Java.Util.UUID) if an encrypted and authenticated communication channel is desired.

This is designed to be used with BluetoothAdapter.ListenUsingInsecureRfcommWithServiceRecord(string, Java.Util.UUID) for peer-peer Bluetooth applications.

Use BluetoothSocket.Connect to initiate the outgoing connection. This will also perform an SDP lookup of the given uuid to determine which channel to connect to.

The remote device will be authenticated and communication on this socket will be encrypted.

Hint: If you are connecting to a Bluetooth serial board then try using the well-known SPP UUID 00001101-0000-1000-8000-00805F9B34FB. However if you are connecting to an Android peer then please generate your own unique UUID.

Requires NoType:android/Manifest$permission;Href=../../../reference/android/Manifest.permission.html#BLUETOOTH

[Android Documentation]

Requirements

Namespace: Android.Bluetooth
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 10