Fix notification issue when device is set in silent mode for Android 8+

This commit is contained in:
stom79 2018-09-23 11:20:39 +02:00
parent 785c418537
commit 14ab884622
1 changed files with 1 additions and 1 deletions

View File

@ -888,7 +888,7 @@ public class Helper {
String soundUri = sharedpreferences.getString(Helper.SET_NOTIF_SOUND, ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + context.getPackageName() +"/"+ R.raw.boop);
AudioAttributes audioAttributes = new AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setUsage(AudioAttributes.USAGE_ALARM)
.setUsage(AudioAttributes.USAGE_NOTIFICATION)
.build();
channel.setSound(Uri.parse(soundUri), audioAttributes);
}