I have developed App for android with Firebase for push and I want to send push notifications with default sound of device. I have tested app on android 6 and work correctly, it show the icon, title, body, and has sound. But when I sent the push to android 9 device, It received the push but without sound, vibration, led.... only the title and body. Could tell me how set all flags of ligth, vibration and sound on Channels on Android 9? I check the phone settings and I can see how app by default is disabled and channel enabled only the sound, and I would like to enabled it by default as other apps are doing Thank you
The part of code.
var channelId = channel.NotificationChannelId;
var channelName = channel.NotificationChannelName;
var channelImportance = channel.NotificationChannelImportance;
var notificationManager = (NotificationManager)context.GetSystemService(Context.NotificationService);
var notChannel = new NotificationChannel(channelId, channelName, channelImportance);
if (SoundUri != null)
{
try
{
var soundAttributes = new AudioAttributes.Builder()
.SetContentType(AudioContentType.Sonification)
.SetUsage(AudioUsageKind.Notification).Build();
notChannel.SetSound(SoundUri, soundAttributes);
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex);
}
}
notificationManager.CreateNotificationChannel(notChannel);