title: node-gcm cordova android custom sound push
body: <p>I have a project on CORDOVA. Connected to it FCM.
  The instructions indicate that I can set my sound to a notification.</p>
  
  <p><a href="https://firebase.google.com/docs/cloud-messaging/http-server-refa" rel="nofollow noreferrer">https://firebase.google.com/docs/cloud-messaging/http-server-refa</a></p>
  
  <p><a href="https://i.stack.imgur.com/qfxQB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qfxQB.png" alt="enter image description here"></a></p>
  
  <p>On the server (node.js), I am using the node-gcm module. The documentation also says that you can set the sound</p>
  
  <p><a href="https://www.npmjs.com/package/node-gcm" rel="nofollow noreferrer">https://www.npmjs.com/package/node-gcm</a></p>
  
  <p>In the project itself, the sound file is in several places (just for the sake of the case):</p>
  
  <p>cordova-root/</p>
  
  <ol>
  <li>test.mp3 res/raw/test.mp3</li>
  <li>res/android/raw/test.mp3</li>
  <li>platforms/android/res/raw/test.mp3</li>
  <li>platforms/android/app/src/main/res/raw/test.mp3</li>
  </ol>
  
  <p>After the assembly, I checked for the presence of sound in the APK file along the path res/raw/test.mp3 - it is there.</p>
  
  <p>I am sending a message from the server. It is successfully displayed on the smartphone, BUT SOUND DEFAULT. Not the one I set.</p>
  
  <p>Question: How do I get messages to arrive with the right sound?
  Testing for ANDROID 9</p>
  
  <pre><code>var message = new gcm.Message({
    notification: {
      sound: 'test',
      title: "TITLE",
      body: "BODY",
    }
  });
  </code></pre>