Custom Notification Sound not working in Android Oreo

前端 未结 6 1681
闹比i
闹比i 2020-12-14 16:44
Uri sound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + \"://\" + context.getPackageName() + \"/\" + R.raw.notification_mp3);
            mBuilder.setSound(s         


        
6条回答
  •  孤城傲影
    2020-12-14 17:29

    mBuilder.setPriority(NotificationCompat.PRIORITY_HIGH)
    

    This line of code is worked for me. But you have to delete old channel and create new one.

提交回复
热议问题