Changes

Jump to: navigation, search

B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt

664 bytes added, 07:50, 22 August 2014
findService(DOMString serviceUuid)
=== findService(DOMString serviceUuid) ===
 
; Description
: The method is a helper to find the [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattService#BluetoothGattService|BluetoothGattService]] object of given service UUID from the offered GATT services list (i.e., property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt#services|services]]). If multiple instances of the same service (as identified by service UUID) exist, the first instance of the service is returned.
 
; Return
: [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattService#BluetoothGattService|BluetoothGattService]] object of given service UUID.
 
; Sample
var gatt = device.gatt;
if (gatt) {
heartRateService = gatt.findService(0x180D);
}
Confirm
891
edits

Navigation menu