Android.Bluetooth.BluetoothAdapter Class
Represents the local device Bluetooth adapter.

See Also: BluetoothAdapter Members

Syntax

[Android.Runtime.Register("android/bluetooth/BluetoothAdapter", DoNotGenerateAcw=true)]
public sealed class BluetoothAdapter : Java.Lang.Object

Remarks

Represents the local device Bluetooth adapter. The Android.Bluetooth.BluetoothAdapter lets you perform fundamental Bluetooth tasks, such as initiate device discovery, query a list of bonded (paired) devices, instantiate a Android.Bluetooth.BluetoothDevice using a known MAC address, and create a Android.Bluetooth.BluetoothServerSocket to listen for connection requests from other devices, and start a scan for Bluetooth LE devices.

To get a Android.Bluetooth.BluetoothAdapter representing the local Bluetooth adapter, when running on JELLY_BEAN_MR1 and below, call the static BluetoothAdapter.DefaultAdapter method; when running on JELLY_BEAN_MR2 and higher, retrieve it through Android.Content.Context.GetSystemService(string) with Android.Content.Context.BluetoothService. Fundamentally, this is your starting point for all Bluetooth actions. Once you have the local adapter, you can get a set of Android.Bluetooth.BluetoothDevice objects representing all paired devices with BluetoothAdapter.BondedDevices; start device discovery with BluetoothAdapter.StartDiscovery; or create a Android.Bluetooth.BluetoothServerSocket to listen for incoming connection requests with BluetoothAdapter.ListenUsingRfcommWithServiceRecord(string, Java.Util.UUID); or start a scan for Bluetooth LE devices with BluetoothAdapter.StartLeScan(.ILeScanCallback).

Note: Most methods require the NoType:android/Manifest$permission;Href=../../../reference/android/Manifest.permission.html#BLUETOOTH permission and some also require the NoType:android/Manifest$permission;Href=../../../reference/android/Manifest.permission.html#BLUETOOTH_ADMIN permission.

Developer Guides

For more information about using Bluetooth, read the Bluetooth developer guide.

See Also

[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