I am sending a notifications via Firebase and I have issues with the sound. I've tried more solutions found on this forum, but still did not help.
The problem is - the sound is WORKING when I debug the app on my device, but the sound is NOT working after I publish my app to store... and this is what I don't understand.
The code:
Uri sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder builder = new NotificationCompat.Builder(this,
getString(R.string.default_notification_channel_id))
.setSmallIcon(R.mipmap.ic_notify)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setSound(sound)
.setContentIntent(pi);
NotificationManager manager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
assert manager != null;
manager.notify(0, builder.build());
I want to play a default sound, nothing custom. No clue why it is working when testing and not working when published.