コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ヒアラブルの操作
ファスト ペアリングのヒアラブル コントロールは、Android の重要なヒアラブル機能へのアクセス制御を改善することを目的としています。これを実現するため、メッセージ ストリーム内に新しいメッセージ グループ「ヒアラブル コントロール」を追加しました。
メッセージ グループ名 |
値 |
ヒアラブルの操作 |
0x08 |
アクティブ ノイズ コントロール
アクティブ ノイズ コントロールは、プレミアム ヘッドフォンの重要な機能になりつつあります。シーカー側では、ファスト ペアリングに状態の設定、取得、保存を行う UI とロジックがあり、状態はプロバイダ側に保存されます。イベント ストリームが接続されたときに、プロバイダが セッション ノンスを送信することは必須です。このため、次のメッセージ コードが定義されています。
メッセージ コード名 |
値 |
ギフトの送り主 |
回答者 |
MAC |
ACK |
ANC の状態を取得する |
0x11 |
Seeker |
プロバイダ |
N |
N |
ANC の状態を設定する |
0x12 |
Seeker |
プロバイダ |
Y |
Y |
ANC の状態を通知する |
0x13 |
プロバイダ |
Seeker |
N |
N |
シーカーがプロバイダに接続したとき、またはプロバイダが「ANC 状態を取得」メッセージを受信したとき、プロバイダは ANC 状態を通知して、シーカーに ANC 機能と保存された状態を知らせることができます。メッセージは次のとおりです。
バイト |
データ型 |
説明 |
値 |
0 |
uint8 |
ヒアラブルの操作 |
0x08 |
1 |
uint8 |
ANC の状態を通知する |
0x13 |
2 ~ 3 |
uint16 |
追加データ長 |
0x04 |
4 ~ 7 |
|
ANC 制御データ |
varies |
ANC 制御データ
バイト |
データ型 |
説明 |
値 |
0 |
uint8 |
バージョン コード |
、このバージョンでは 0x02 |
1 |
フラグ |
UI 切り替え 各モードは、フラグビットの値に応じて有効(1)または無効(0)になります。 ビット 0(MSB): 透明 ビット 1: アダプティブ(サポートされていない場合は 0) ビット 2: オフ ビット 3: 予約済み(ビットを 0 に設定) ビット 4: ANC |
varies |
2 |
フラグ |
設定可能な切り替え 上記の UI 切り替えビットのいずれかまたはすべてをここで設定して、現在有効になっているものを示すこともできます。 |
varies |
3 |
フラグ |
現在の状態 設定できるビットは 1 つのみで、このバイトの値は 0 以外でなければなりません。 |
varies |
Seeker は、ANC 制御データに従って切り替え UI を表示します。
例 1: プロバイダが 3 ウェイ ANC(外部音取り込み - オフ - ANC)をサポートしており、イヤホンが頭に装着されていて、すべてのモードが設定可能で、現在の状態がオフの場合:
バイト |
データ型 |
説明 |
値 |
0 |
uint8 |
バージョン コード |
0x01 |
1 |
フラグ |
UI の切り替え |
0b10101000 |
2 |
フラグ |
設定可能な切り替え |
0b10101000 |
3 |
フラグ |
現在の状態 |
0b00100000 |
例 2: プロバイダが 3 ウェイ ANC(外部音取り込み - オフ - ANC)をサポートしており、現在ヘッドホンを装着しているのは片方のみ、または両方とも装着していないため、モードを設定できず、現在の状態はオフです。
バイト |
データ型 |
説明 |
値 |
0 |
uint8 |
バージョン コード |
0x01 |
1 |
フラグ |
UI 切り替え |
0b10101000 |
2 |
フラグ |
設定可能な切り替え |
0b00000000 |
3 |
フラグ |
現在の状態 |
0b00100000 |
ユーザーが切り替えボタンを切り替えると、シーカーは次のように現在の状態をプロバイダに設定します。
バイト |
データ型 |
説明 |
値 |
0 |
uint8 |
ヒアラブルの操作 |
0x08 |
1 |
uint8 |
ANC の状態を設定する |
0x12 |
2 ~ 3 |
uint16 |
追加データ長 |
varies、0x04 または 0x14 |
4 |
uint8 |
Seeker のバージョン コード |
可変、0x01 または 0x02 |
5 |
フラグ |
ANC の設定可能なモード(UI 切り替え) |
varies |
6 |
フラグ |
ANC 有効モード(切り替え可能) |
varies |
7 |
フラグ |
新しい ANC モードのインデックス(新しい状態) |
varies |
8 - 23 |
|
予約済み |
varies |
バイト 4 ~ 7 は、実際には Seeker 側から送信された ANC 制御データです。追加の長さの値が 0x14 に設定されている場合、予約済みのバイト 8 ~ 23 が存在し、これらのバイトを受信すると、プロバイダはそれらを無視する必要があります。追加の長さの値が 0x04 に設定されている場合、予約済みのバイトは存在しません。
プロバイダが「ANC 状態の設定」メッセージを受信した場合、確認応答を行い、接続されているすべてのシーカーに ANC 状態を通知する必要があります。ユーザーがヘッドセットのジェスチャーまたはコンパニオン アプリケーションで設定を変更した場合、プロバイダは接続されているすべてのシーカーにも通知を送信する必要があります。
例 3: プロバイダが 4 ウェイ ANC(透明 - アダプティブ - オフ - ANC)をサポートし、イヤホンが装着され、すべてのモードが設定可能で、現在の状態がアダプティブの場合:
バイト |
データ型 |
説明 |
値 |
0 |
uint8 |
バージョン コード |
0x01 |
1 |
フラグ |
UI 切り替え |
0b11101000 |
2 |
フラグ |
設定可能な切り替え |
0b11101000 |
3 |
フラグ |
現在の状態 |
0b01000000 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-28 UTC。
[null,null,["最終更新日 2025-08-28 UTC。"],[[["\u003cp\u003eHearable Controls utilize Message Stream to enhance access to headphone features on Android.\u003c/p\u003e\n"],["\u003cp\u003eActive Noise Control (ANC) functionality allows for setting, retrieving, and saving noise cancellation preferences.\u003c/p\u003e\n"],["\u003cp\u003eANC state is communicated between devices, allowing the user interface to reflect available and current noise control modes.\u003c/p\u003e\n"],["\u003cp\u003eANC state can be controlled by the user via device UI and is synchronized across connected devices through notifications.\u003c/p\u003e\n"]]],["Hearable controls are added within the Message Stream for better access to hearable features. Active Noise Control (ANC) functionality is implemented, allowing the Seeker to get, set, and save the ANC state, which is stored by the Provider. The Provider can notify the Seeker of ANC capabilities and stored state. UI toggles for ANC are managed via flags, including transparent, off, and ANC modes. The Seeker sends a \"Set ANC state\" message to update the current ANC mode. The Provider must acknowledge these messages and notify connected Seekers.\n"],null,["Hearable Controls\n\nHearable controls on Fast Pair aim to provide better access controls for\nimportant Hearable features on Android. A new message group Hearable\ncontrols inside [Message Stream](/nearby/fast-pair/specifications/extensions/messagestream#MessageStream \"Message Stream\") has been added to achieve this.\n\n| Message Group Name | Value |\n|--------------------|-------|\n| Hearable control | 0x08 |\n\nActive noise control\n\nActive noise control is becoming a prominent feature for premium headphones. On\nthe Seeker side, Fast Pair will have the UI and logic to set, get and save the\nstate, and the state will be stored on the Provider side.\nIt is mandatory for provider to send [Session Nonce](/nearby/fast-pair/specifications/extensions/mac#SessionAndMessageNonce \"Session Nonce\") when event\nstream is connected.\nTo achieve this, below message codes are defined:\n\n| Message Code Name | Value | Sender | Responder | MAC | ACK |\n|-------------------|-------|----------|-----------|-----|-----|\n| Get ANC state | 0x11 | Seeker | Provider | N | N |\n| Set ANC state | 0x12 | Seeker | Provider | Y | Y |\n| Notify ANC state | 0x13 | Provider | Seeker | N | N |\n\nWhen a Seeker connects to a Provider, or when a Provider receives a \"Get ANC\nstate\" message, the Provider\ncan Notify the ANC state to let the Seeker know its ANC capability and its\nstored state. The message is as follow:\n\n| Byte | Data Type | Description | Value |\n|-------|-----------|-------------------------------------|----------|\n| 0 | uint8 | Hearable control | 0x08 |\n| 1 | uint8 | Notify ANC state | 0x13 |\n| 2 - 3 | uint16 | Additional data length | 0x04 |\n| 4 - 7 | | [ANC control data](#ANCControlData) | *varies* |\n\nANC control data\n\n| Byte | Data Type | Description | Value |\n|------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------|\n| 0 | uint8 | Version code | *varies*, 0x02 for this version |\n| 1 | Flags | UI toggles Each mode is enabled (1) or disabled (0) according to the value of its flag bit, as follows: Bit 0 (MSB): transparent Bit 1: adaptive (or 0 if it is not supported) Bit 2: off Bit 3: Reserved (Set bit to 0) Bit 4: ANC | *varies* |\n| 2 | Flags | Settable toggles Any or all of the UI toggle bits above may also be set here, to indicate which are currently enabled. | *varies* |\n| 3 | Flags | Current state Only one bit can be set and value of this byte shall be non zero. | *varies* |\n\nThe Seeker will show the toggle UI according to the ANC control data.\n\nExample 1: The Provider supports 3-way ANC: transparent - off - ANC \\& buds are\non-head, all modes are settable now, and current state is off:\n\n| Byte | Data Type | Description | Value |\n|------|-----------|------------------|------------|\n| 0 | uint8 | Version code | 0x01 |\n| 1 | Flags | UI toggles | 0b10101000 |\n| 2 | Flags | Settable toggles | 0b10101000 |\n| 3 | Flags | Current state | 0b00100000 |\n\nExample 2: The Provider supports 3-way ANC: transparent - off - ANC, only one\nbud is on-head now or no buds is on-head, so no modes are settable, and the\ncurrent state is off:\n\n| Byte | Data Type | Description | Value |\n|------|-----------|-----------------|------------|\n| 0 | uint8 | Version code | 0x01 |\n| 1 | Flags | UI toggle | 0b10101000 |\n| 2 | Flags | Settable toggle | 0b00000000 |\n| 3 | Flags | Current state | 0b00100000 |\n\nIf the user switches the toggle, the Seeker will set the current state to the\nProvider as follow:\n\n| Byte | Data Type | Description | Value |\n|--------|-----------|-------------------------------------|------------------------|\n| 0 | uint8 | Hearable control | 0x08 |\n| 1 | uint8 | Set ANC state | 0x12 |\n| 2 - 3 | uint16 | Additional data length | *varies*, 0x04 or 0x14 |\n| 4 | uint8 | Seeker Version code | *varies*, 0x01 or 0x02 |\n| 5 | Flags | ANC Settable modes (UI toggle) | *varies* |\n| 6 | Flags | ANC Enabled modes (Settable toggle) | *varies* |\n| 7 | Flags | New ANC mode index (New state) | *varies* |\n| 8 - 23 | | Reserved | *varies* |\n\nThe byte 4 - 7 is actually [ANC control data](#ANCControlData) sent from\nSeeker side. If additional length value is set as 0x14, the reserved bytes 8-23\nwould be present and on receipt of these bytes, the provider should ignore them.\nIf additional length value is set as 0x04, there are no reserved bytes present.\n\nWhen a Provider receives a \"Set ANC state\" message, it should [Acknowledge](/nearby/fast-pair/specifications/extensions/acknowledgement#MessageStreamAcknowledgements \"Message Stream Acknowledgements\"),\nand Notify ANC state to all connected Seekers.\nIf the user changes the setting via headset gesture or companion application,\nthe Provider should also send notification to all connected Seekers.\n\nExample 3: The Provider supports 4-way ANC: transparent - adaptive - off - ANC,\nbuds are on-head, all modes are settable now, and current state is adaptive:\n\n| Byte | Data Type | Description | Value |\n|------|-----------|-----------------|------------|\n| 0 | uint8 | Version code | 0x01 |\n| 1 | Flags | UI toggle | 0b11101000 |\n| 2 | Flags | Settable toggle | 0b11101000 |\n| 3 | Flags | Current state | 0b01000000 |"]]