I create a notification channel with NotificationManager.IMPORTANCE_HIGH:
When i check notification channel created on device, the channel is created successfully, but when I open Notification setting from app settings, the notification sound is disabled.
In other devices the notification channel is correctly created and sound is enabled.
Someone know how solve this problem?
Thanks
Java:
NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
String CHANNEL_ID_CALL = "call";
NotificationChannel mChannel = new NotificationChannel(CHANNEL_ID_CALL, context.getResources().getString(R.string.notification_call_channel_name), NotificationManager.IMPORTANCE_HIGH);
mChannel.setDescription(context.getResources().getString(R.string.notification_call_channel_description));
Uri notificationSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
AudioAttributes attributes = new AudioAttributes.Builder().setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setLegacyStreamType(AudioManager.STREAM_RING)
.setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE).build();
mChannel.setSound(notificationSound, attributes);
mChannel.setVibrationPattern(new long[]{0, 700, 500, 700});
mChannel.enableVibration(true);
mChannel.enableLights(true);
mNotificationManager.createNotificationChannel(mChannel);
When i check notification channel created on device, the channel is created successfully, but when I open Notification setting from app settings, the notification sound is disabled.
In other devices the notification channel is correctly created and sound is enabled.
Someone know how solve this problem?
Thanks