title: Android Firebase push notification custom sound is not working
body: <p>1)This is my fire base class in this class message is received.</p>
  
  <pre><code>public class FirebaseMessagingPushService extends FirebaseMessagingService {
  
      @Override
      public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
          super.onMessageReceived(remoteMessage);
          Log.d("Sound Bell", "From: " + remoteMessage.getNotification().getSound());
  
  
          if (remoteMessage.getData().size() &gt; 0) {
              sendNotification(remoteMessage);
          }
  
      }
  
      private void sendNotification(RemoteMessage remoteMessage) {
          Map&lt;String, String&gt; data = remoteMessage.getData();
          final String ChannelID = "my_channel_01"; //this is my channel id name
          String title = data.get("title");
          String message = data.get("body");
          String sound = remoteMessage.getNotification().getSound();
          String action = remoteMessage.getNotification().getClickAction();
          String Notification = remoteMessage.getNotification().getChannelId();
  
  
  
          Uri sounduri = Uri.parse(String.format("android.resource://%s/%s/%s", this.getPackageName(), "raw", sound));
          Log.i("hellosound", String.valueOf(sounduri));
          Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.getDefaultType(sounduri));
  
          NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this, ChannelID)
                  .setSmallIcon(R.drawable.logomadhuras)
                  .setContentTitle(title)
                  .setStyle(new NotificationCompat.BigTextStyle()
                          .bigText(message))
                  .setPriority(NotificationCompat.PRIORITY_DEFAULT)
                  .setDefaults(NotificationCompat.DEFAULT_ALL)
                  .setAutoCancel(true);
  
          int notificationId = (int) System.currentTimeMillis();
          mBuilder.setSound(alarmSound);
          mBuilder.setContentIntent(resultPendingIntent);
  
          NotificationManager manager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
  
          if (manager != null) {
      ***********Here i create channel*******
              if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O) {
                  NotificationChannel channel = new NotificationChannel(ChannelID,
                          "Human Readable channel id",
                          NotificationManager.IMPORTANCE_HIGH);
                  AudioAttributes attributes = new AudioAttributes.Builder()
                          .setUsage(AudioAttributes.USAGE_NOTIFICATION)
                          .build();
                  channel.setShowBadge(true);
                  channel.setSound(alarmSound, attributes);
                  manager.createNotificationChannel(channel);
  
              }
  
              manager.notify(notificationId, mBuilder.build());
          }
      }
  
  }
  </code></pre>
  
  <p>2)This below code is defined in manifest file.</p>
  
  <pre><code>   &lt;meta-data
                android:name="com.google.firebase.messaging.default_notification_channel_id"
                android:value="my_channel_01" /&gt;
      &lt;service
              android:name=".FirebaseMessagingPushService"
              android:exported="false"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.google.firebase.MESSAGING_EVENT" /&gt;
              &lt;action android:name="com.google.firebase.INSTANCE_ID_EVENT" /&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/service&gt;  
  </code></pre>
  
  <p>3) I pass both channel id and sound in json file of fire base..</p>
  
  <p>PROBLEM - I want my custom sound in my application but when i received message from firebase i 
          can not get custom sound but my mobile ringtone is playing on message received..Please give me solution how to set custom sound..And my mobile version is android pie. </p>