I need to show a notification without playing a notification sound using notification builder.
I tried using
set sound(null);
And I have also tried using the custom sound
Here is my code:
public NotificationCompat.Builder getChannelNotification() {
getData();
return new NotificationCompat.Builder(getApplicationContext(), channelID)
.setContentTitle(time)
.setContentText(text)
.setSmallIcon(R.drawable.ic_android)
.setDefaults(0)
.setPriority(NotificationCompat.PRIORITY_LOW)
.setAutoCancel(true)
.setOnlyAlertOnce(true)
.setSound(null);
}