このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

BluetoothRemoteGATTService

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。

Web Bluetooth APIBluetoothRemoteGATTService インターフェイスは、GATT サーバーにより提供されるサービスを表します。デバイス、参照されるサービス、このサービスのキャラクタリスティックのリストも含みます。

EventTarget BluetoothRemoteGATTService

インスタンスプロパティ

BluetoothRemoteGATTService.device 読取専用

BluetoothDevice のインスタンスを通じて、この Bluetooth デバイスの情報を返します。

BluetoothRemoteGATTService.isPrimary 読取専用

これがプライマリーサービスなのかセカンダリーサービスなのかを表す論理値を返します。

BluetoothRemoteGATTService.uuid 読取専用

このサービスの UUID を表す文字列を返します。

インスタンスメソッド

BluetoothRemoteGATTService.getCharacteristic()

指定の universally unique identifier (UUID) に対応する BluetoothRemoteGATTCharacteristic のインスタンスで解決する Promise を返します。

BluetoothRemoteGATTService.getCharacteristics()

省略可能な universally unique identifier (UUID) に対応する BluetoothRemoteGATTCharacteristic のインスタンスの Array で解決する Promise を返します。

仕様書

Specification
Web Bluetooth
# bluetoothgattservice-interface

ブラウザーの互換性