Version: Smart Feature Phone 3.0

BluetoothAdapterEvent

Description#

The BluetoothAdapterEvent interface of the Bluetooth API provides access to a BluetoothAdapter object and its address as the parameter of a adapteradded or adapterremoved event handler (see BluetoothManager.onadapteradded and BluetoothManager.onadapterremoved), when fired.

Interface overview#

[CheckAnyPermissions="bluetooth"]
interface BluetoothAdapterEvent : Event
{
readonly attribute BluetoothAdapter? adapter;
readonly attribute DOMString? address;
};

Properties#

  • BluetoothAdapterEvent.adapter {.read-only .no-link}

Returns the BluetoothAdapter object. This is null for the BluetoothManager.onadapterremoved event handler since the corresponding adapter is already removed.

  • BluetoothAdapterEvent.address {.read-only .no-link}

Returns a DOMString representing the address of the removed adapter. The property is null for the BluetoothManager.onadapteradded event handler since the adapter already has an BluetoothAdapter.address property.