Skip to content

Commit 497c8ce

Browse files
author
UnnatiCP
committed
Update Documentation for Custom Sound in Android Push Notifications
Update Documentation for Custom Sound in Android Push Notifications
1 parent 951f2ec commit 497c8ce

3 files changed

Lines changed: 58 additions & 32 deletions

File tree

docs/sdks/android/extension.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -281,33 +281,3 @@ CleverPush.getInstance(this).trackNotificationClicked(notification.id)
281281
```
282282

283283
<!--END_DOCUSAURUS_CODE_TABS-->
284-
285-
## Send Notifications with Pop-up, Sound & Vibration, or Silent Mode
286-
287-
If you want to send notifications as a pop-up, with sound and vibration, or silently with vibration only, you can set a category when creating a push notification.
288-
289-
By default, if you create a push notification without selecting a category, it will be displayed in the status bar with sound.
290-
291-
You can also set a default category in the `General Settings` to avoid selecting a category manually every time you create a push notification.
292-
293-
![Default_Category](https://static.cleverpush.com/notification/icon/WiiWotRb7NgB9S4tK.png)
294-
295-
To customize the notification behavior, you can create a category and set the Importance level as follows:
296-
297-
`Urgent/High` – Displays a high-priority pop-up notification with sound and vibration.
298-
299-
`Medium` – Displays the notification with sound and vibration, but without a pop-up.
300-
301-
`Low` – Displays the notification without sound.
302-
303-
![Category](https://static.cleverpush.com/notification/icon/Muzg6n6n7ZDWAbh3i.png)
304-
305-
## Enable or Disable Notification Badges
306-
307-
You can control whether a notification displays a badge by assigning a category when creating the push notification.
308-
309-
When setting up a notification category, you can choose to Enable or Disable badge display. This determines whether the app icon badge count or dot will be shown for notifications in that category.
310-
311-
By default, if you create a push notification without selecting a category, the badge will be displayed.
312-
313-
![Badge](https://static-mobile.cleverpush.com/app-banner/icon/rF7qzLg4EAi9RQgCD.png)

docs/sdks/android/setup.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can find the newest sdk version number here [Android SDK](https://github.com
2121
```groovy
2222
dependencies {
2323
// ...
24-
implementation 'com.cleverpush:cleverpush:1.35.3'
24+
implementation 'com.cleverpush:cleverpush:1.35.4'
2525
}
2626
```
2727

@@ -315,6 +315,62 @@ You can set large icon from Create new -> Icon.
315315

316316
If you do not set a large icon, channel icon from dashborad will be used instead, if there is no channel icon set in CleverPush dashboard then it will not display large icon.
317317

318+
## Notification Category (Channel)
319+
320+
By default, if you send a push notification without selecting a category, it will be delivered via the SDK's default channel, using IMPORTANCE_DEFAULT and the device's default notification sound.
321+
322+
Using notification categories, you can create custom notification channels with personalized settings—such as importance level, sound, and vibration behavior, etc.
323+
324+
### Send Notifications with Pop-up, Sound & Vibration, or Silent Mode
325+
326+
If you want to send notifications as a pop-up, with sound and vibration, or silently with vibration only, you can set a category when creating a push notification.
327+
328+
By default, if you create a push notification without selecting a category, it will be displayed in the status bar with sound.
329+
330+
You can also set a default category in the `General Settings` to avoid selecting a category manually every time you create a push notification.
331+
332+
![Default_Category](https://static.cleverpush.com/notification/icon/WiiWotRb7NgB9S4tK.png)
333+
334+
To customize the notification behavior, you can create a category and set the Importance level as follows:
335+
336+
`Urgent/High` – Displays a high-priority pop-up notification with sound and vibration.
337+
338+
`Medium` – Displays the notification with sound and vibration, but without a pop-up.
339+
340+
`Low` – Displays the notification without sound.
341+
342+
![Category](https://static.cleverpush.com/notification/icon/Muzg6n6n7ZDWAbh3i.png)
343+
344+
### Enable or Disable Notification Badges
345+
346+
You can control whether a notification displays a badge by assigning a category when creating the push notification.
347+
348+
When setting up a notification category, you can choose to Enable or Disable badge display. This determines whether the app icon badge count or dot will be shown for notifications in that category.
349+
350+
By default, if you create a push notification without selecting a category, the badge will be displayed.
351+
352+
![Badge](https://static-mobile.cleverpush.com/app-banner/icon/rF7qzLg4EAi9RQgCD.png)
353+
354+
### Set Custom Sound for Notification
355+
356+
To send a notification with a **custom sound**, you need to configure it through a **notification category**.
357+
358+
1. **Select** a category when creating your push notification.
359+
2. In notification category, in the **Sound** dropdown, choose **Custom**.
360+
3. In the **Sound Name** field, enter the name of your custom sound file (without the file extension).
361+
362+
> **Example**: If your file is named `custom_notification.mp3`, enter `custom_notification` in the Sound Name field.
363+
364+
4. Place the sound file in your app’s `res/raw` directory.
365+
366+
> 📁 `app/src/main/res/raw/custom_notification.mp3`
367+
368+
Once configured, any push notification sent using this category will play the custom sound.
369+
370+
![Res_Raw](https://static-mobile.cleverpush.com/app-banner/icon/fBHPJdZohDXJ54Gt3.png)
371+
372+
![Push_Category_Sound](https://static-mobile.cleverpush.com/app-banner/icon/P5FG6nQcAPGGFRsc2.png)
373+
318374
## Badges
319375

320376
Unlike iOS, Android does not provide a native API to manually set or update the badge count on the app icon.

docs/sdks/ios/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ title: Setup
1919
Add CleverPush to your Podfile:
2020

2121
```bash
22-
pod 'CleverPush', '~> 1.34.19'
22+
pod 'CleverPush', '~> 1.34.21'
2323
```
2424

2525
#### Swift Package Manager Setup

0 commit comments

Comments
 (0)