Skip to content

Commit

Permalink
Add some additional alarm stream parameters (#1167)
Browse files Browse the repository at this point in the history
  • Loading branch information
dshokouhi committed Nov 9, 2020
1 parent f0f9bd2 commit ff89dea
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,8 @@ class MessagingService : FirebaseMessagingService() {
) {
val audioAttributes = AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setFlags(AudioAttributes.FLAG_AUDIBILITY_ENFORCED)
.setLegacyStreamType(AudioManager.STREAM_ALARM)
.setUsage(AudioAttributes.USAGE_ALARM)
.build()
channel.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM), audioAttributes)
Expand Down

0 comments on commit ff89dea

Please sign in to comment.