---
sourceDocument: Xanadu モバイルの構成とナビゲーション
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/xanadu/mobile

 Release :

    - xanadu

ft:locale :

    - ja-JP

ft:publication_title :

    - Xanadu モバイルの構成とナビゲーション

ft:clusterId :

    - mobile

bundleId :

    - mobile

workflow :

    - Platform


---

# プッシュ通知のサウンドを構成する

# プッシュ通知のサウンドを構成する {#ariaid-title1}

* リリースバージョン: Xanadu
* 
* 更新日 2024年08月01日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：4分

プッシュ通知にサウンドとトーンを追加して、メッセージが緊急であるか、単にユーザーの注意が必要なだけであるかをユーザーに示す。

## プッシュ通知にサウンドを追加するための JSON の例 {#push-notif-sounds__section_khp_z1m_q1c}

次の JSON は、プッシュ通知にトーンを追加する方法の例です。この例で使用されているトーンの名前は NotificationAlert-2" です。

    json["aps"]["sound"] = "NotificationAlert-2.caf";

このトピックの最後にある表に、使用可能なすべてのトーンを示します。各サウンドのトーンを聴くには、ターゲット サウンド パラメーターを使用して通知を設定する必要があります。  
注:  
トーンごとに、接尾辞 `「-Short`」を追加してリングの長さを短くするオプションがあります。`NotificationAlert-5.caf`を除くすべてのトーンを短くすることができます。

## 音声を含む重要なアラートの JSON の例 {#push-notif-sounds__section_omd_hpd_q1c}

次の JSON は、重大なアラートに対してサウンドパラメーターを定義する方法の例です。重大なアラートの詳細については、「 [モバイルクリティカルアラート](https://servicenow-prod.fluidtopics.net/gmH3uQgH50eRYOjgvB~pLQ "モバイルデバイスが応答不可またはサイレントモードに設定されていても、ユーザーに重要なアラートを送信します。これらの視覚的および音声的アラートは、問題に緊急の対応が必要な場合に送信されるように設定します。シナリオの例としては、重要な更新をユーザーに通知する場合や、迅速な対応を必要とする重大なインシデントを公表する場合が挙げられます。")」を参照してください。  

    json["aps"]["sound"] = { 
              "critical": 1, 
              "name": "NotificationAlert-3-Short.caf", 
              "volume": 1.0 
          }; 

サンプルの JSON コード内のパラメーターは、次のとおりです。

* critical パラメーターは、通知を重大なアラートとして定義します。`1` は重大アラートがアクティブであることを意味し、`0` は重大アラートが非アクティブであることを意味します。
* volume パラメーターは、通知音の音量を定義します。範囲は、最も静かな `0.1` から最も大きな `1.0` までです。
* name パラメーターは、プッシュ通知が送信されたときにアクティブ化されるトーンの名前です。重要なアラートの場合は、ドラマチックなトーンでユーザーのリズムを考慮します。  
  注:  
  name値が定義されていない場合、システムはアプリケーションのデフォルトの着信音を使用します。アプリケーションに着信音が定義されていない場合、システムはデバイスのデフォルトの着信音を使用します。

  各サウンドのトーンを聴くには、ターゲット サウンド パラメーターを使用して通知を設定する必要があります。
  指定できる値を次の表に示します。  
  注:  
  トーンごとに、接尾辞 `「-Short`」を追加してリングの長さを短くするオプションがあります。`NotificationAlert-5.caf`を除くすべてのトーンを短くすることができます。
  {#push-notif-sounds__table_pq2_lqd_q1c__entry__2}

  | 使用できるファイル名の値 | 音のリズム |
  |-|-|
  | `NotificationAlert-1.caf` | まろやか、リラックス、スロー |
  | `NotificationAlert-1-Short.caf` | まろやか、リラックス、スロー |
  | `NotificationAlert-2.caf` | 劇的 |
  | `NotificationAlert-2-Short.caf` | 劇的 |
  | `NotificationAlert-3.caf` | 劇的 |
  | `NotificationAlert-3-Short.caf` | 劇的 |
  | `NotificationAlert-4.caf` | まろやか、リラックス、スロー |
  | `NotificationAlert-4-Short.caf` | まろやか、リラックス、スロー |
  | `NotificationAlert-5.caf` | まろやか、リラックス、スロー |
  | `NotificationAlert-6.caf` | お祭り、幸せ |
  | `NotificationAlert-6-Short.caf` | お祭り、幸せ |
  | `NotificationAlert-7.caf` | お祭り、幸せ |
  | `NotificationAlert-7-Short.caf` | お祭り、幸せ |
  | `NotificationAlert-8.caf` | お祭り、幸せ |
  | `NotificationAlert-8-Short.caf` | お祭り、幸せ |
  | `NotificationAlert-9.caf` | ドラマチックでパワフル |
  | `NotificationAlert-9-Short.caf` | ドラマチックでパワフル |
  | `NotificationAlert-10.caf` | ドラマチック、サスペンスフル |
  | `NotificationAlert-10-Short.caf` | ドラマチック、サスペンスフル |
  | `NotificationAlert-11.caf` | 劇的 |
  | `NotificationAlert-11-Short.caf` | 劇的 |
  | `NotificationAlert-12.caf` | 劇的 |
  | `NotificationAlert-12-Short.caf` | 劇的 |
  | `NotificationAlert-13.caf` | 劇的 |
  | `NotificationAlert-13-Short.caf` | 劇的 |
  | `NotificationAlert-14.caf` | 劇的 |
  | `NotificationAlert-14-Short.caf` | 劇的 |
  [ ]

  {#push-notif-sounds__table_pq2_lqd_q1c}

{#push-notif-sounds__ul_zpp_ztj_d1c}  
注:  
名前の値が定義されていない場合、システムはアプリケーションのデフォルトの着信音を使用します。アプリケーションに着信音が定義されていない場合、システムはデバイスのデフォルトの着信音を使用します。

