@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="Bluetooth")
public class Bluetooth
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
EventHandler |
onadvertisementreceived |
EventHandler |
onavailabilitychanged
The onavailabilitychanged property of the Bluetooth interface is an EventHandler that processes availabilitychanged events that fire when the Bluetooth system as a whole becomes available or unavailable to the User Agent.
|
EventHandler |
oncharacteristicvaluechanged |
EventHandler |
ongattserverdisconnected |
EventHandler |
onserviceadded |
EventHandler |
onservicechanged |
EventHandler |
onserviceremoved |
| Modifier | Constructor and Description |
|---|---|
protected |
Bluetooth() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAvailabilitychangedListener(EventListener callback) |
void |
addAvailabilitychangedListener(EventListener callback,
AddEventListenerOptions options) |
void |
addAvailabilitychangedListener(EventListener callback,
boolean useCapture) |
Promise<java.lang.Boolean> |
getAvailability()
The getAvailability() method of Bluetooth interface of Web Bluetooth API interface exposes the Bluetooth capabilities of the current device.
|
Promise<JsArray<BluetoothDevice>> |
getDevices()
The getDevices() method of Bluetooth interface of Web Bluetooth API exposes the Bluetooth devices this origin is allowed to access.
|
BluetoothDevice |
referringDevice()
The Bluetooth.referringDevice attribute of the Bluetooth interface returns a BluetoothDevice if the current document was opened in response to an instruction sent by this device and null otherwise.
|
void |
removeAvailabilitychangedListener(EventListener callback) |
void |
removeAvailabilitychangedListener(EventListener callback,
boolean useCapture) |
void |
removeAvailabilitychangedListener(EventListener callback,
EventListenerOptions options) |
Promise<BluetoothDevice> |
requestDevice()
The Bluetooth.requestDevice() method of the Bluetooth interface returns a Promise to a BluetoothDevice object with the specified options.
|
Promise<BluetoothDevice> |
requestDevice(RequestDeviceOptions options)
The Bluetooth.requestDevice() method of the Bluetooth interface returns a Promise to a BluetoothDevice object with the specified options.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListener@Nullable public EventHandler onadvertisementreceived
@Nullable public EventHandler onavailabilitychanged
@Nullable public EventHandler oncharacteristicvaluechanged
@Nullable public EventHandler ongattserverdisconnected
@Nullable public EventHandler onserviceadded
@Nullable public EventHandler onservicechanged
@Nullable public EventHandler onserviceremoved
@JsProperty(name="referringDevice") @Nullable public BluetoothDevice referringDevice()
@Nonnull public Promise<java.lang.Boolean> getAvailability()
@Nonnull public Promise<JsArray<BluetoothDevice>> getDevices()
@Nonnull public Promise<BluetoothDevice> requestDevice(@Nonnull RequestDeviceOptions options)
@Nonnull public Promise<BluetoothDevice> requestDevice()
@JsOverlay
public final void addAvailabilitychangedListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addAvailabilitychangedListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addAvailabilitychangedListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeAvailabilitychangedListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeAvailabilitychangedListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeAvailabilitychangedListener(@Nonnull
EventListener callback)