title: Custom notification sound in android using raw folder
body: <p>am using below code to set custom notification sound from raw folder, but its not working</p>
  <p>//get custom mp3 Uri from raw folder path from
  Uri sound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + &quot;://&quot; + getPackageName() + &quot;/raw/tone_3.mp3&quot;);</p>
  <p>//set notification style &amp; sound
  noBuilder = new NotificationCompat.Builder(this, channelId)
  .setLargeIcon(icon)
  .setSmallIcon(R.mipmap.ic_launcher)//notification icon, ic_notification
  .setColor(getBaseContext().getResources().getColor(R.color.colorPrimary))
  .setContentTitle(title)
  .setContentText(message)
  .setSound(sound)
  .setAutoCancel(true)
  .setStyle(new NotificationCompat.BigTextStyle().bigText(message))
  .setContentIntent(pendingIntent);</p>
  <p>//create notification channel for api 26
  public static String createNotificationChannel(Context context, Uri sound) {</p>
  <pre><code>    // NotificationChannels are required for Notifications on O (API 26) and above.
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O) {
  
          AudioAttributes audioAttributes = new AudioAttributes.Builder()
                  .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
                  .setUsage(AudioAttributes.USAGE_ALARM)
                  .build();
  
          // The id of the channel.
          String channelId = Config.CHANNEL_ID;
  
          // The user-visible name of the channel.
          CharSequence channelName = Config.CHANNEL_NAME;
          // The user-visible description of the channel.
          String channelDescription = Config.CHANNEL_DESC;
          int channelImportance = NotificationManager.IMPORTANCE_HIGH;
          boolean channelEnableVibrate = true;
          //int channelLockscreenVisibility = Notification.;
  
          // Initializes NotificationChannel.
          NotificationChannel notificationChannel = new NotificationChannel(channelId, channelName, channelImportance);
          notificationChannel.setDescription(channelDescription);
          notificationChannel.enableVibration(channelEnableVibrate);
          notificationChannel.setVibrationPattern(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});
          notificationChannel.setSound(sound, audioAttributes);
          //notificationChannel.setLockscreenVisibility(channelLockscreenVisibility);
  
          // Adds NotificationChannel to system. Attempting to create an existing notification
          // channel with its original values performs no operation, so it's safe to perform the
          // below sequence.
          NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
          assert notificationManager != null;
          notificationManager.createNotificationChannel(notificationChannel);
  
          return channelId;
      } else {
          // Returns null for pre-O (26) devices.
          return Config.CHANNEL_ID;
      }
  }
  </code></pre>