Yes, the sounds can be defined by the app.
> In the iOS case (with Cordova) the only way to make the sound play that I know is to put the file in the project's root and pointing to it. I tested and it works. Not that i use it very much, but sometimes it's needed...
> The function you use to play a sound along with the notification is:
if (e.sound) {
var media = new Media("/android_asset/www/" + e.sound);
media.play();
}
I didn't manage to make it work. Anyway I think it would be more "normal" a function like the one I sent. But, as I told before, the vibration and / or sound play only makes sense when the notification arrives in the notification area, not before I pressed on it.
Mind for instance a geofenced notification:the user must see it at the moment it arrives, and not 30 minutes later. In this case the vibration or sound are very important.