Back to Content

BluetoothRemoteGATTServer: getPrimaryServices() method

files/en-us/web/api/bluetoothremotegattserver/getprimaryservices/index.md

latest683 B
Original Source

{{APIRef("Bluetooth API")}}{{SeeCompatTable}}{{SecureContext_Header}}

The BluetoothRemoteGATTServer.getPrimaryServices() method returns a promise to a list of primary {{domxref("BluetoothRemoteGATTService")}} objects offered by the Bluetooth device for a specified BluetoothServiceUUID.

Syntax

js-nolint
getPrimaryServices(bluetoothServiceUUID)

Parameters

  • bluetoothServiceUUID
    • : A Bluetooth service universally unique identifier for a specified device.

Return value

A {{jsxref("Promise")}} that resolves to a list of {{domxref("BluetoothRemoteGATTService")}} objects.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}