BluetoothPairingListener (Firefox OS)

This API is available on Firefox OS for internal applications only.

The BluetoothPairingListener interface of the Web Bluetooth API defines event handlers triggered for different pairing operations.

Interface overview

JavaScript
[AvailableIn=CertifiedApps, CheckPermissions="bluetooth"]
interface BluetoothPairingListener: EventTarget {
  attribute EventHandler <a href="https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener#ondisplaypasskeyreq" class="external" title="B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener">ondisplaypasskeyreq</a>;
  attribute EventHandler <a href="https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener#onenterpincodereq" class="external" title="B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener">onenterpincodereq</a>;
  attribute EventHandler <a href="https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener#onpairingconfirmationreq" class="external" title="B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener">onpairingconfirmationreq</a>;
  attribute EventHandler <a href="https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener#onpairingconsentreq" class="external" title="B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingListener">onpairingconsentreq</a>;
}

Event handlers

BluetoothPairingListener.ondisplaypasskeyreq
A event handler triggered when the displaypasskeyreq event is fired; this occurs when a remote bluetooth device makes a request to display the passkey on the screen during the pairing process. The event parameter is a BluetoothPairingEvent.
BluetoothPairingListener.onenterpincodereq
A event handler triggered when the enterpincodereq event is fired; this occurs when a remote bluetooth device requests the user to enter a PIN code during the pairing process. The event parameter is a BluetoothPairingEvent.
BluetoothPairingListener.onpairingconfirmationreq
A event handler triggered when the displaypasskeyreq event is fired; this occurs when a remote bluetooth device requests the user to confirm their passkey during the pairing process. Applications may prompt the user to confirm the passkey explicitly, or confirm the passkey for the user proactively. The event parameter is a BluetoothPairingEvent.
BluetoothPairingListener.onpairingconsentreq
A event handler triggered when the pairingconsentreq event is fired; this occurs when a remote bluetooth device asks the user to confirm pairing during the pairing process. Applications may prompt the user for confirmation, or confirm for the user proactively. The event parameter is a BluetoothPairingEvent.

Methods

None.

Specifications

Specification Status Comment
Web Bluetooth
The definition of 'BluetoothPairingListener' in that specification.
Draft Rough draft; not part of any official specification yet. It should be discussed as part of the W3C's System Applications Working Group.

Browser Compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support No support No support No support No support No support
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support No support No support 2.1 No support No support No support No support

 

See also

Using the Web Bluetooth API

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/bluetoothpairinglistener_(firefox_os)

API B2G BluePairingListener Bluetooth Certified Firefox OS Interface Non-standard Reference Web Bluetooth