BluetoothAdapter BluetoothAdapter Class

Definition

Represents the local device Bluetooth adapter.

[Android.Runtime.Register("android/bluetooth/BluetoothAdapter", ApiSince=5, DoNotGenerateAcw=true)]
public sealed class BluetoothAdapter : Java.Lang.Object
type BluetoothAdapter = class
    inherit Object
Inheritance
BluetoothAdapterBluetoothAdapter
Attributes

Remarks

Android platform documentation

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Fields

ActionConnectionStateChanged ActionConnectionStateChanged

Intent used to broadcast the change in connection state of the local Bluetooth adapter to a profile of the remote device.

ActionDiscoveryFinished ActionDiscoveryFinished

Broadcast Action: The local Bluetooth adapter has finished the device discovery process.

ActionDiscoveryStarted ActionDiscoveryStarted

Broadcast Action: The local Bluetooth adapter has started the remote device discovery process.

ActionLocalNameChanged ActionLocalNameChanged

Broadcast Action: The local Bluetooth adapter has changed its friendly Bluetooth name.

ActionRequestDiscoverable ActionRequestDiscoverable

Activity Action: Show a system activity that requests discoverable mode.

ActionRequestEnable ActionRequestEnable

Activity Action: Show a system activity that allows the user to turn on Bluetooth.

ActionScanModeChanged ActionScanModeChanged

Broadcast Action: Indicates the Bluetooth scan mode of the local Adapter has changed.

ActionStateChanged ActionStateChanged

Broadcast Action: The state of the local Bluetooth adapter has been changed.

Error Error

Sentinel error value for this class.

ExtraConnectionState ExtraConnectionState

Extra used by ActionConnectionStateChanged

This extra represents the current connection state.

ExtraDiscoverableDuration ExtraDiscoverableDuration

Used as an optional int extra field in ActionRequestDiscoverable intents to request a specific duration for discoverability in seconds.

ExtraLocalName ExtraLocalName

Used as a String extra field in ActionLocalNameChanged intents to request the local Bluetooth name.

ExtraPreviousConnectionState ExtraPreviousConnectionState

Extra used by ActionConnectionStateChanged

This extra represents the previous connection state.

ExtraPreviousScanMode ExtraPreviousScanMode

Used as an int extra field in ActionScanModeChanged intents to request the previous scan mode.

ExtraPreviousState ExtraPreviousState

Used as an int extra field in ActionStateChanged intents to request the previous power state.

ExtraScanMode ExtraScanMode

Used as an int extra field in ActionScanModeChanged intents to request the current scan mode.

ExtraState ExtraState

Used as an int extra field in ActionStateChanged intents to request the current power state.

Properties

Address Address

Returns the hardware address of the local Bluetooth adapter.

BluetoothLeAdvertiser BluetoothLeAdvertiser

Returns a BluetoothLeAdvertiser object for Bluetooth LE Advertising operations.

BluetoothLeScanner BluetoothLeScanner

Returns a BluetoothLeScanner object for Bluetooth LE scan operations.

BondedDevices BondedDevices

Return the set of BluetoothDevice objects that are bonded (paired) to the local adapter.

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
DefaultAdapter DefaultAdapter

Get a handle to the default local Bluetooth adapter.

Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
IsDiscovering IsDiscovering

Return true if the local Bluetooth adapter is currently in the device discovery process.

IsEnabled IsEnabled

Return true if Bluetooth is currently enabled and ready for use.

IsLe2MPhySupported IsLe2MPhySupported
IsLeCodedPhySupported IsLeCodedPhySupported
IsLeExtendedAdvertisingSupported IsLeExtendedAdvertisingSupported
IsLePeriodicAdvertisingSupported IsLePeriodicAdvertisingSupported
IsMultipleAdvertisementSupported IsMultipleAdvertisementSupported

Return true if the multi advertisement is supported by the chipset

IsOffloadedFilteringSupported IsOffloadedFilteringSupported

Return true if offloaded filters are supported

IsOffloadedScanBatchingSupported IsOffloadedScanBatchingSupported

Return true if offloaded scan batching is supported

JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
LeMaximumAdvertisingDataLength LeMaximumAdvertisingDataLength
Name Name

Get the friendly Bluetooth name of the local Bluetooth adapter.

PeerReference PeerReference Inherited from Object
ScanMode ScanMode

Get the current Bluetooth scan mode of the local Bluetooth adapter.

State State

Get the current state of the local Bluetooth adapter.

ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

CancelDiscovery() CancelDiscovery()

Cancel the current device discovery process.

CheckBluetoothAddress(String) CheckBluetoothAddress(String)

Validate a String Bluetooth address, such as "00:43:A8:23:10:F0"

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
CloseProfileProxy(ProfileType, IBluetoothProfile) CloseProfileProxy(ProfileType, IBluetoothProfile)

Close the connection of the profile proxy to the Service.

Disable() Disable()

Turn off the local Bluetooth adapter—do not use without explicit user action to turn off Bluetooth.

Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Enable() Enable()

Turn on the local Bluetooth adapter—do not use without explicit user action to turn on Bluetooth.

Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
GetProfileConnectionState(ProfileType) GetProfileConnectionState(ProfileType)

Get the current connection state of a profile.

GetProfileProxy(Context, IBluetoothProfileServiceListener, ProfileType) GetProfileProxy(Context, IBluetoothProfileServiceListener, ProfileType)

Get the profile proxy object associated with the profile.

GetRemoteDevice(Byte[]) GetRemoteDevice(Byte[])

Get a BluetoothDevice object for the given Bluetooth hardware address.

GetRemoteDevice(String) GetRemoteDevice(String)

Get a BluetoothDevice object for the given Bluetooth hardware address.

JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
ListenUsingInsecureRfcommWithServiceRecord(String, UUID) ListenUsingInsecureRfcommWithServiceRecord(String, UUID)

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

ListenUsingRfcommWithServiceRecord(String, UUID) ListenUsingRfcommWithServiceRecord(String, UUID)

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

Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetName(String) SetName(String)

Set the friendly Bluetooth name of the local Bluetooth adapter.

StartDiscovery() StartDiscovery()

Start the remote device discovery process.

StartLeScan(BluetoothAdapter+ILeScanCallback) StartLeScan(BluetoothAdapter+ILeScanCallback)

Starts a scan for Bluetooth LE devices.

StartLeScan(UUID[], BluetoothAdapter+ILeScanCallback) StartLeScan(UUID[], BluetoothAdapter+ILeScanCallback)

Starts a scan for Bluetooth LE devices, looking for devices that advertise given services.

StopLeScan(BluetoothAdapter+ILeScanCallback) StopLeScan(BluetoothAdapter+ILeScanCallback)

Stops an ongoing Bluetooth LE device scan.

ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to