iOS Question Custom sound on remote notification

Nicolás Cieri

Active Member
Licensed User
Hello, could someone explain to me why this code works on some iPhones and not in others?
In foreground it always works perfect (in all iphones), but in background, it only works in some.

Am I doing something wrong?

In those that does not work, the notification is not even visible.


Private Sub Application_RemoteNotification (Message As Map, CompletionHandler As CompletionHandler)

                Dim nm As String = Message.Get("nm")
                Dim n As Notification
                Dim no As NativeObject = n
                n.PlaySound = True
                n.AlertBody = nm 
                If App.OSVersion >= 8.2 Then
                    no.SetField("alertTitle", "Alert")
                    'Custom sound
                    no.SetField("soundName", "csound.wav")
                End If
                NativeMe.RunMethod("register", Null)

End Sub
Last edited:

Nicolás Cieri

Active Member
Licensed User
Ok, after many attempts, I realized that the "silent notification" only works if the device is wn Wifi or in Foreground. That is why I cannot play in "background" when on 4G.

If the notification is not silent, that is, I do it normal.

So if I receive the notification in the background regardless of whether I am on Wifi or 4G, the problem then is that the "Custom Sound" does not respect me.

The notification is received with the normal sound, and the mediaplayer runs until the application is opened.

Is there a way to change the remote notification sound?

Put a custom sound? I have done the tests in sending the "sound" parameter, but I can't make it change the default sound.

This post only works for local notifications.
Upvote 0