Android.Bluetooth.BluetoothAdapter.ListenUsingInsecureRfcommWithServiceRecord Method
Create a listening, insecure RFCOMM Bluetooth socket with Service Record.

Syntax

[Android.Runtime.Register("listenUsingInsecureRfcommWithServiceRecord", "(Ljava/lang/String;Ljava/util/UUID;)Landroid/bluetooth/BluetoothServerSocket;", "")]
public BluetoothServerSocket ListenUsingInsecureRfcommWithServiceRecord (string p0, Java.Util.UUID p1)

Parameters

name
service name for SDP record
uuid
uuid for SDP record

Returns

Documentation for this section has not yet been entered.

Exceptions

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

Remarks

Create a listening, insecure RFCOMM Bluetooth socket with Service Record.

The link key is not required to be authenticated, i.e the communication may be vulnerable to Man In the Middle attacks. For Bluetooth 2.1 devices, the link will be encrypted, as encryption is mandartory. For legacy devices (pre Bluetooth 2.1 devices) the link will not be encrypted. Use BluetoothAdapter.ListenUsingRfcommWithServiceRecord(string, Java.Util.UUID), if an encrypted and authenticated communication channel is desired.

Use BluetoothServerSocket.Accept to retrieve incoming connections from a listening Android.Bluetooth.BluetoothServerSocket.

The system will assign an unused RFCOMM channel to listen on.

The system will also register a Service Discovery Protocol (SDP) record with the local SDP server containing the specified UUID, service name, and auto-assigned channel. Remote Bluetooth devices can use the same UUID to query our SDP server and discover which channel to connect to. This SDP record will be removed when this socket is closed, or if this application closes unexpectedly.

Use BluetoothDevice.CreateRfcommSocketToServiceRecord(Java.Util.UUID) to connect to this socket from another device using the same Java.Util.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