Netmera Developer Guide
Netmera Docs
  • Netmera Developer Guide
  • Platforms
    • iOS
      • New iOS (Swift)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Widget and In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Advertising ID
        • Changelog
      • Former iOS (Objective-C)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Push Payload Receivers
          • Widget and In-App Messages
          • Customizing In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
          • Custom Web View Presentation
          • Push Icon
        • Live Activities
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Data Transfer
        • Advertising ID
        • SSL Pinning
        • Changelog
    • Android
      • SDK Integration
        • Huawei Integration
        • Huawei Message Receipt
        • Android Integration FAQs
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
        • Custom Web View Presentation
        • Push Icon
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
        • Background Location Permission
      • User & Attributes
      • Data Transfer
      • Advertising ID
      • App Tracking
      • SSL Pinning
      • Changelog
    • Web
      • SDK Setup
        • Self-Hosted SDK Setup
      • Mobile Web Push for iOS
      • Deep Linking
        • Custom Deep Links
      • Events
      • User & Attributes
    • React Native
      • SDK Integration
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • Changelog
    • Flutter
      • SDK Integration
      • Push Notifications
        • Push Notification Permissions
        • Widget and In-App Messages
        • Flutter iOS Media Push
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • SSL Pinning
      • Changelog
    • Cordova
      • SDK Integration
      • Push Notifications
      • Sound & Vibration
      • Push Inbox
      • Events
      • User & Attributes
    • Unity
      • SDK Integration
      • Sound & Vibration
      • Events
      • User & Attributes
      • Changelog
  • Integrated Modules
    • Optimove
    • Adjust
    • Mixpanel
    • IYS Integration
    • VIA Integration
      • Short URL Consent Requests
      • OTP Consent Requests
        • OTP Confirmation Completion
      • VIA Email Rejection Link Generation
      • ETK Rejection via SMS
  • API Documentation
    • REST API
      • Setup
      • Notifications
      • Events
      • User & Device Management
      • Inbox Feature
      • GDPR
      • Error Responses
  • FAQs
    • Push Notifications FAQs
Powered by GitBook
On this page
  • Sending a Push Notification with Vibration for iOS
  • Sending a Push Notification with Vibration for Android
  • Adding Custom Sound to Your Project
  • Sending Push Notifications with Sound

Was this helpful?

  1. Platforms
  2. Flutter

Sound & Vibration

Sending a Push Notification with Vibration for iOS

When sending a push notification on iOS with any sound selected, the device will vibrate if the vibration feature is enabled in the device settings.

It's important to note that there is no option within the push notification itself to enable vibration. If vibration is disabled at the device level, the push notification will not trigger vibration.

Sending a Push Notification with Vibration for Android

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

<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:

Step 1: Add Sound Files

iOS

  1. Add your sound files to the "Library/Sounds" directory within your project.

  2. Ensure these files are added at the iOS target level or the application level.

Android

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

Sound File Formats:

  • File extensions for sound files must be one of the following:.wav, or .caf.

  • Custom sounds should not exceed a maximum length of 30 seconds.

Step 2: Web Panel Configuration

After adding the sound file to your project, follow these steps in the web panel:

  1. Navigate to Developers > Sound > Create New Sound.

  2. While creating the sound, use the file extensions in the "Sound FileName" field. When referencing files, include the file extension for iOS and use only the filename (without the extension) for Android.

  3. Select the desired sound name from the drop-down menu. All items in the menu are sound files whose extensions match the supported push sound extensions (.aiff, .wav, .caf)

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 included in your main bundle; otherwise, the default phone sound will be played when receiving push notifications.

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.

PreviousCustom Deep LinksNextPush Inbox

Last updated 3 months ago

Was this helpful?