B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent: Difference between revisions

Jump to navigation Jump to search
Line 79: Line 79:


== Methods ==
== Methods ==
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPasskey.28DOMString_aPasskey.29|BluetoothPairingHandle.setPasskey(DOMString aPasskey)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPinCode.28DOMString_aPinCode.29|BluetoothPairingHandle.setPinCode(DOMString aPinCode)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPairingConfirmation.28boolean_aConfirm.29|BluetoothPairingHandle.setPairingConfirmation(boolean aConfirm)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent#setPairingConfirmation.28boolean_aConfirm.29|BluetoothPairingHandle.setPairingConfirmation(boolean aConfirm)]]


=== setPasskey(DOMString aPasskey) ===
=== setPinCode(DOMString aPinCode) ===
; Description
; Description
: The method replies passkey or PIN code to the remote device when the local bluetooth adapter is pairing with it.  
: The method replies PIN code to the remote device when the local bluetooth adapter is pairing with it.  


; Parameter
; Parameter
: ''aPasskey''
: ''aPinCode''
:: A DOMString representing the passkey or PIN code set by user.
:: A DOMString representing the PIN code set by user.


; Return
; Return
: A Promise to indicate whether the operation is resolved or rejected. If setPasskey is invalid for current pairing request, the Promise would be rejected.
: A Promise to indicate whether the operation is resolved or rejected. If setPinCode is invalid for current pairing request, the Promise would be rejected.


=== setPairingConfirmation(boolean aConfirm) ===
=== setPairingConfirmation(boolean aConfirm) ===
120

edits

Navigation menu