

I also checked the card payment feature as I heard that can cause sounds and I do keep my debit card in my phone case but that was turned off and I tested by taking my card out of the case and it still makes the sound occasionally. I've checked in exceptions too and nothing. Everytime it does it I go into notifications trying to track down the culprit but there is never any log of recent notifications. Several times a day the phone makes a sound like a notification alert. But recently something must have changed. It's always on silent mode and so never makes a sound unless I'm playing multimedia or it vibrates lightly when I get a call. If (_INT >= Build.VERSION_CODES.I wonder if this community can help me! I have had my Samsung galaxy S8 for several years and I love it. NotificationManager.notify(0, notification) įor the Oreo and higher, you need to check the SDK_VERSION and use the setSound method of the NotificationChannel Uri sound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + context.getPackageName() + "/" + R.raw.FILE_NAME) //Here is FILE_NAME is the name of file that you want to play Use these lines of code for custom sound notification.sound =Uri.parse("android.resource://"+context.getPackageName()+"/"+R.raw.FILE_NAME) //Here is FILE_NAME is the name of file that you want to play Notification.flags |= Notification.FLAG_AUTO_CANCEL tLatestEventInfo(context, title, message, intent) PendingIntent intent = PendingIntent.getActivity(context, 0, set intent so it does not start a new activity

NotificationIntent.putExtra("isInbox", true) Intent notificationIntent = new Intent(context, String title = context.getString(R.string.app_name) Notification notification = new Notification(icon, message, when) Firstly make the folder in Resource (res) name it raw and put the file (YOUR_SOUND_FILE.MP3) in it and than use below lines of code for custom sound NotificationManager notificationManager = (NotificationManager) context
