I want to specify the name of the melody when sending push notifications from the server, so that when the message is received, the desired melody is played. In the case when the application is running, I can catch the incoming message and then generate the notification myself. But in the case when the application is not included - I do not manage this process. I managed to transfer the name of the icon for the message that lies in res / drawable - and it works. I put the melody in res / raw / jingle_bells_sms.ogg but it did not work.

Question: Is it possible to set your own sound for such messages in principle, in which folder should these sounds lie and where could I make a mistake?

Here is the message I'm trying to send:

 var message = new gcm.Message({ collapseKey: 'data', priority: 'high', contentAvailable: true, delayWhileIdle: false, timeToLive: 10000, data: { message: 'Message from gcm server', action: 'Update data on server' }, notification: { tag : 'hasData', title: "My notification title", icon: "ic_launcher", color: "#22C064", sound: "jingle_bells_sms", soundname: "jingle_bells_sms", body: "This is a GCM notification that will be displayed ASAP.", click_action: "OPEN_APP" } }); 

    0