Hi,
My goal is to add a sound to a received notification since backendless by default does not provide this function while sound notification for IOS is supported.
what I did, I extended BackendlessBroadcastReceiver.java class and tried to overwrite OnMessage but it shows deprecated, however I overwritten it but it never gets called.
I followed everything in the documentation, and I was able to get the notification but without sound as I mentioned
is there another way to solve the sound issue?
Thanks,
Mohammed
Hi, Mohammed.
Please, investigate our documentation
https://backendless.com/docs/android/doc.html#push-notification-setup-android
Pay attention on how to extend classes BackendlessPushService and BackendlessBroadcastReceiver.They are both needed.
The logic of processing push messages should be in class that extends BackendlessPushService.
As for sound, you may play it manually in BackendlessPushService::onMessage() method using standard Android MediaService.
But i can add, that we are working now on new Backendless release, that will include extended features for working with push notifications, among which there will be the possibility of using sound.
Hi Oleg,
I would like to thank you for responding to my question, but like I put in my post, I have followed what is in the documentation and couldn’t achieve the sound thing on android.
If you can provide a simple example, it would be great
Based on your answer, there is a possibility to add sound to android notification, but not guaranteed.
again, if you can provide an example it would be greatly appreciated
Thanks,
Mohammed
Hi Mohammed,
What Oleg was saying is that there’s no built-in possibility to add a sound to the push notification. Instead, you can do that in your app when the push notification arrives. For that you should consult the Android documentation (here’s the first result from google search).
The documentation linked above describes what you should do to be able to execute your custom code when the notification arrives. It already contains a sample (see the class MyPushService extends BackendlessPushService).
And repeating Oleg’s words, we’re soon updating Backendless with rich built-in functionalities, including sound and layout, to be able to send from console with no hassle in your app’s code. No specific release date yet, but I believe you should wait no more than a month. So stay tuned with our news!
Thank you Sergey,
I guess, I will wait for the new release for now