title: android notification channel sound not working
body: <p>I know there has be a lot of post about the issue. I have tried them all. Here are the steps I did.</p>
  
  <p>First I found out that once a channel has been created it can't be change. The only way was to reinstall the app. So that's what I did and it did not work.</p>
  
  <p>Second, some say I can delete the channel so I also did that using this code</p>
  
  <pre><code>val channelList = mNotificationManager.notificationChannels
          var i = 0
          while (channelList != null &amp;&amp; i &lt; channelList.size) {
              Log.d("channelList","channel ID is ${channelList[i].id}")
              //mNotificationManager.deleteNotificationChannel(channelList[i].id)
              i++
          }
  </code></pre>
  
  <p>and then recreating the channel after deletion.</p>
  
  <p>Third, I tried using a new notification channel but I kept getting an error every time I use the new channel.</p>
  
  <p>Here is the code I am using with all those solution that I tried</p>
  
  <pre><code> val audioAttributes = AudioAttributes.Builder()
                  .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
                  .setUsage(AudioAttributes.USAGE_ALARM)
                  .build()
  
  
          val importance = NotificationManager.IMPORTANCE_DEFAULT
  
          val channelList = mNotificationManager.notificationChannels
          var i = 0
          while (channelList != null &amp;&amp; i &lt; channelList.size) {
              Log.d("channelList","channel ID is ${channelList[i].id}")
              mNotificationManager.deleteNotificationChannel(channelList[i].id)
              i++
          }
  
          Log.d("isnotification"," is it needed $isNotificationSoundNeeded importance is $importance")
          val mChannel = NotificationChannel(CHANNEL_ID, appName,  NotificationManager.IMPORTANCE_HIGH)
          mChannel.setShowBadge(false)
          mChannel.setSound(notifSound, audioAttributes)
  
  
  
          val mChannelnew = NotificationChannel(CHANNEL_ID2, appName,  NotificationManager.IMPORTANCE_DEFAULT)
          mChannelnew.setShowBadge(false)
          mChannelnew.setSound(notifSound, audioAttributes)
  
  
  
  
          mNotificationManager.createNotificationChannel(mChannel)
  </code></pre>
  
  <p>What am I missing? Any ideas? Thanks</p>
  
  <p>Update: here is the code for notifsound</p>
  
  <pre><code>val notifSound = Uri.parse("android.resource://" + packageName + "/" + R.raw.unconvinced)
  </code></pre>