Skip to content

Commit

Permalink
disable notification sound on oreo
Browse files Browse the repository at this point in the history
  • Loading branch information
F43nd1r committed Oct 10, 2017
1 parent 5940932 commit 49812be
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public boolean performInteraction(@NonNull Context context, @NonNull CoreConfigu
//We have to create a channel on Oreo+, because notifications without one aren't allowed
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
final NotificationChannel channel = new NotificationChannel(CHANNEL, context.getString(notificationConfig.resChannelName()), notificationConfig.resChannelImportance());
channel.setSound(null, null);
if (notificationConfig.resChannelDescription() != ACRAConstants.DEFAULT_RES_VALUE) {
channel.setDescription(context.getString(notificationConfig.resChannelDescription()));
}
Expand All @@ -85,7 +86,6 @@ public boolean performInteraction(@NonNull Context context, @NonNull CoreConfigu
.setContentTitle(context.getString(notificationConfig.resTitle()))
.setContentText(context.getString(notificationConfig.resText()))
.setSmallIcon(notificationConfig.resIcon())
.setDefaults(0)
.setPriority(NotificationCompat.PRIORITY_HIGH);
//add ticker if set
if (notificationConfig.resTickerText() != ACRAConstants.DEFAULT_RES_VALUE) {
Expand Down

0 comments on commit 49812be

Please sign in to comment.