See Also: BluetoothDevice
public sealed class BluetoothDevice : Object, IParcelable, IDisposable
Represents a remote Bluetooth device. A BluetoothDevice lets you create a connection with the respective device or query information about it, such as the name, address, class, and bonding state.
This class is really just a thin wrapper for a Bluetooth hardware address. Objects of this class are immutable. Operations on this class are performed on the remote Bluetooth hardware address, using the BluetoothAdapter that was used to create this BluetoothDevice.
To get a BluetoothDevice, use BluetoothAdapter.GetRemoteDevice(String) to create one representing a device of a known MAC address (which you can get through device discovery with BluetoothAdapter) or get one from the set of bonded devices returned by BluetoothAdapter.BondedDevices. You can then open a BluetoothSocket for communication with the remote device, using BluetoothDevice.CreateRfcommSocketToServiceRecord(UUID).
Note: Requires the NoType:android/Manifest$permission;Href=../../../reference/android/Manifest.permission.html#BLUETOOTH permission.
For more information about using Bluetooth, read the Bluetooth developer guide.
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 5
The members of Android.Bluetooth.BluetoothDevice are listed below.
See Also: Object
|ActionAclConnected||String. Broadcast Action: Indicates a low level (ACL) connection has been established with a remote device.|
|ActionAclDisconnected||String. Broadcast Action: Indicates a low level (ACL) disconnection from a remote device.|
|ActionAclDisconnectRequested||String. Broadcast Action: Indicates that a low level (ACL) disconnection has been requested for a remote device, and it will soon be disconnected.|
|ActionBondStateChanged||String. Broadcast Action: Indicates a change in the bond state of a remote device.|
|ActionClassChanged||String. Broadcast Action: Bluetooth class of a remote device has changed.|
|ActionFound||String. Broadcast Action: Remote device discovered.|
|ActionNameChanged||String. Broadcast Action: Indicates the friendly name of a remote device has been retrieved for the first time, or changed since the last retrieval.|
|ActionPairingRequest||String. Broadcast Action: This intent is used to broadcast PAIRING REQUEST|
|ActionUuid||String. Broadcast Action: This intent is used to broadcast the UUID wrapped as a ParcelUuid of the remote device after it has been fetched.|
|DeviceTypeClassic||BluetoothDeviceType (1). Bluetooth device type, Classic - BR/EDR devices|
|DeviceTypeDual||BluetoothDeviceType (3). Bluetooth device type, Dual Mode - BR/EDR/LE|
|DeviceTypeLe||BluetoothDeviceType (2). Bluetooth device type, Low Energy - LE-only|
|DeviceTypeUnknown||BluetoothDeviceType (0). Bluetooth device type, Unknown|
|Error||Int32 (-2147483648). Sentinel error value for this class.|
|ExtraBondState||String. Used as an int extra field in BluetoothDevice.ActionBondStateChanged intents.|
|ExtraClass||String. Used as a Parcelable BluetoothClass extra field in BluetoothDevice.ActionFound and BluetoothDevice.ActionClassChanged intents.|
|ExtraDevice||String. Used as a Parcelable BluetoothDevice extra field in every intent broadcast by this class.|
|ExtraName||String. Used as a String extra field in BluetoothDevice.ActionNameChanged and BluetoothDevice.ActionFound intents.|
|ExtraPairingKey||String. Used as an int extra field in BluetoothDevice.ActionPairingRequest intents as the value of passkey.|
|ExtraPairingVariant||String. Used as an int extra field in BluetoothDevice.ActionPairingRequest intents to indicate pairing method used.|
|ExtraPreviousBondState||String. Used as an int extra field in BluetoothDevice.ActionBondStateChanged intents.|
|ExtraRssi||String. Used as an optional short extra field in BluetoothDevice.ActionFound intents.|
|ExtraUuid||String. Used as an extra field in BluetoothDevice.ActionUuid intents, Contains the ParcelUuids of the remote device which is a parcelable version of UUID.|
|PairingVariantPasskeyConfirmation||Int32 (2). The user will be prompted to confirm the passkey displayed on the screen or an app will confirm the passkey for the user.|
|PairingVariantPin||Int32 (0). The user will be prompted to enter a pin or an app will enter a pin for user.|
|[read-only]||Address||String. Returns the hardware address of this BluetoothDevice.|
|[read-only]||BluetoothClass||BluetoothClass. Get the Bluetooth class of the remote device.|
|[read-only]||BondState||Bond. Get the bond state of the remote device.|
|[read-only]||Name||String. Get the friendly Bluetooth name of the remote device.|
|[read-only]||Type||BluetoothDeviceType. Get the Bluetooth device type of the remote device.|
|ConnectGatt(Context, Boolean, BluetoothGattCallback)|
Connect to GATT Server hosted by this device.
Start the bonding (pairing) process with the remote device.
Create an RFCOMM BluetoothSocket socket ready to start an insecure outgoing connection to this remote device using SDP lookup of uuid.
Create an RFCOMM BluetoothSocket ready to start a secure outgoing connection to this remote device using SDP lookup of uuid.
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
Perform a service discovery on the remote device to get the UUIDs supported.
Returns the supported features (UUIDs) of the remote device.
Confirm passkey for BluetoothDevice.PairingVariantPasskeyConfirmation pairing.
Set the pin during pairing when the pairing method is BluetoothDevice.PairingVariantPin
Flatten this object in to a Parcel.