I try to play custom sound in my notification.
This is the code I use:
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)
.setContentTitle("")
.setSmallIcon(R.drawable.notification_icon)
.setContentText("")
.setAutoCancel(true)
.setSound(Uri.parse("android.resource://" + context.getPackageName() + "/" + R.raw.notification_sound));
On Galaxy S3 it worked fine but on Galaxy s6 it's not working. The notification is generated but the sound is not played.
Can anyone tell me what the problem could be or give me a hint where to search?