Как использовать собственный звук для уведомлений pu sh?
Это мой код с уведомлением по умолчанию:
Uri uri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this, "default")
.setSmallIcon(R.drawable.logo)
.setContentTitle("Notification")
.setContentText(bodyNotif)
.setSound(uri)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
.setContentIntent(pendingIntent)
.setAutoCancel(true);
Random random = new Random();
int count = random.nextInt(9999 - 1000) + 1000;
Log.e(TAG, "push sendNotification: COUNT "+count );
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
notificationManager.notify(count, mBuilder.build());
createNotificationChannel();