Specific sound when sending push-notification to individual device(s)

Hello!

How to specify sound and icon when sending push-message to individual device as in example below?
https://backendless.com/docs/android/push_target_specific_devices.html

1 Like

Hi @Maria_Kudriashova

Do you send the notifications from a Push Template or use a basic approach?

Best Regards,
Maksym

As I know, targeting individual device by sending notification from push template is not possible.
That’s why I am using the example provided by a link in the question.

You can set the custom notification sound following these steps:

  1. Locate your sound in the raw resource directory. For example: /app/res/raw/mysound.mp3.
  2. Add the custom header with the name of your sound (without file extension):
    publishOptions.putHeader("android-content-sound", "mysound");
  3. Send the notification with defined publish options:
    Backendless.Messaging.publish("Message", publishOptions, deliveryOptions)

Small icon for the notification can be set only from Push Template. Here is the example how to do it:

Also we will release the new version soon that will allow to send the push notifications to individual devices.

Best Regards,
Maksym

1 Like