Android.Bluetooth.BluetoothAdapter.SetName Method
Set the friendly Bluetooth name of the local Bluetooth adapter.

Syntax

[Android.Runtime.Register("setName", "(Ljava/lang/String;)Z", "")]
public bool SetName (string name)

Parameters

name
a valid Bluetooth name

Returns

Documentation for this section has not yet been entered.

Remarks

Set the friendly Bluetooth name of the local Bluetooth adapter.

This name is visible to remote Bluetooth devices.

Valid Bluetooth names are a maximum of 248 bytes using UTF-8 encoding, although many remote devices can only display the first 40 characters, and some may be limited to just 20.

If Bluetooth state is not BluetoothAdapter.STATE_ON, this API will return false. After turning on Bluetooth, wait for BluetoothAdapter.ActionStateChanged with BluetoothAdapter.STATE_ON to get the updated value.

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

[Android Documentation]

Requirements

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