> For the complete documentation index, see [llms.txt](https://user.netmera.com/netmera-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://user.netmera.com/netmera-developer-guide/platforms/android/sound-and-vibration.md).

# Sound & Vibration

### Sending a Push Notification with Vibration for Android <a href="#sending-a-push-notification-with-vibration" id="sending-a-push-notification-with-vibration"></a>

To enable vibration in your Android application, add the following permission to your `AndroidManifest.xml` file as a direct child of the `<manifest>` element:

```java
<uses-permission android:name="android.permission.VIBRATE" />
```

Afterward, ensure that vibration is enabled in the "What" tab while creating a campaign.

### Adding Custom Sound to Your Project

You have the option to customize push notification sounds for different messages. Here's how to do it:

1. Include your sound files in the **"res/raw"** directory within your Android project.

{% hint style="danger" %}
**Sound File Formats:**

* Sound files must use the `.wav` extension.
* Custom sounds should not exceed a maximum length of 30 seconds.
  {% endhint %}

2. Navigate to **Developers > Messaging Assets > Sounds > Create New Sound**.
3. Enter the filename in the **Sound FileName** field. Use the filename without its extension when referencing the sound on Android.
4. Use lowercase letters, numbers, and underscores in sound filenames. For example, reference `notification_sound.wav` as `notification_sound`.
5. Select the desired sound name from the drop-down menu.

{% hint style="warning" %}
**Why Does My Notification Play Default Sound?**

**Exceeding the Limit:** If any sound file exceeds the 30-second limit, the default sound of your phone will play instead of your custom sound.

**Sound File Location:** Ensure that the sound file is in your Android project's `res/raw` directory. Otherwise, the device plays its default sound.
{% endhint %}

### Sending Push Notifications with Sound

To send push notifications with sound, enable the "Play Sound" option on the "What" tab when creating a new push. If you choose "Default," the device's default sound will play, provided that sound is enabled in the device settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://user.netmera.com/netmera-developer-guide/platforms/android/sound-and-vibration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
