BluetoothRemoteGATTServer.getPrimaryServices()

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The BluetoothRemoteGATTServer.getPrimaryServices() method returns a promise to a list of primary BluetoothGATTService objects offered by the bluetooth device for a specified BluetoothServiceUUID.

Syntax

BluetoothRemoteGATTServer.getPrimaryServices(bluetoothServiceUUID).then(function(bluetoothGATTServices) { ... })

Returns

A Promise that resolves to a list of BluetoothGATTService objects.

Parameters

BluetoothServiceUUID
A Bluetooth service universally unique identifier for a specified device.

Specifications

Specification Status Comment
Web Bluetooth
The definition of 'getPrimaryServices()' in that specification.
Draft Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support56 ? No ?43 ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No56 ? No43 ? ?

Document Tags and Contributors

Contributors to this page: ExE-Boss, fscholz, rolfedh, jpmedley
Last updated by: ExE-Boss,