> For the complete documentation index, see [llms.txt](https://docs.webtonative.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.webtonative.com/javascript-apis/os-notification-sound/notification-sound.md).

# Notification Sound

As opposed to [`Sound.play`](broken://pages/5534a5bf4395b1bad8e325ab9826a2109d3c399c)/[`Haptics.trigger`](broken://pages/9ee054bb5947f859bb772318d1490af3b84bd743), which play it on demand from your own JavaScript. This page covers the mechanics both push providers share; the actual sending step is provider-specific:

| Page                                                                                                                    | Use when...                                          |
| ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| [Custom Notification Sound via OneSignal](broken://pages/41598d1a0d3d8fe2e541dc13fbb32f25f73d5560)                      | You send pushes through the **OneSignal Dashboard**. |
| [Custom Notification Sound via Firebase Cloud Messaging (FCM)](broken://pages/3a78b56c939b3b89da342987f226e0771aff18fb) | Your backend calls the **FCM API** directly.         |

> Before using either page below, upload the sound file via the Dashboard — see [Uploading the Sound File](broken://pages/8c1b185b3b39abf677e563aa47c56c51eff246ae#uploading-the-sound-file-dashboard) on the [OS Notification Sound](broken://pages/8c1b185b3b39abf677e563aa47c56c51eff246ae) page. The provider only tells the OS *which* uploaded sound to play — it does not deliver the sound file itself.

> **Platform support:** Android and iOS.

***

## Shared Mechanics (Both Providers)

These OS-level rules apply no matter which service actually sends the push — they're what OneSignal/FCM are ultimately configuring underneath:

* **iOS**: the sound is set by filename **with its extension** (e.g. `custom_notify.wav`), matching exactly what you uploaded for iOS. This maps to the native APNs payload's `sound` field.
* **Android**: the sound is tied to a **Notification Channel**, referenced by the sound's resource name **without extension** (e.g. `custom_notify`). A channel's sound **cannot be changed after it's created** on a user's device — this is an Android OS restriction, so changing a channel's sound requires creating a new channel ID rather than editing the old one.

If you send push notifications through a provider other than OneSignal or FCM in the future, these same two rules still apply — only the provider-specific dashboard/API field names differ.

***

## Choosing a Provider

* Already sending through **OneSignal**? Use the [OneSignal](broken://pages/41598d1a0d3d8fe2e541dc13fbb32f25f73d5560) page — it's dashboard-only, no backend code required.
* Calling the **FCM API** directly from your own backend (not through OneSignal)? Use the [FCM](broken://pages/3a78b56c939b3b89da342987f226e0771aff18fb) page.
