diff --git a/README.md b/README.md index 8feeb6c..a8aeac5 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ await FlutterVolumeController.toggleMute(); #### Set Audio Stream on Android - Adjusts to the audio stream whose volume should be changed by the hardware volume controls. - Supported streams: `AudioStream.voiceCall`, `AudioStream.system`, `AudioStream.ring` - , `AudioStream.music`, `AudioStream.alarm`. + , `AudioStream.music`, `AudioStream.alarm`, `AudioStream.notification`. - For more details, visit [AudioManager](https://developer.android.com/reference/android/media/AudioManager) diff --git a/android/src/main/kotlin/com/yosemiteyss/flutter_volume_controller/AudioStream.kt b/android/src/main/kotlin/com/yosemiteyss/flutter_volume_controller/AudioStream.kt index 0e3cd18..c77c729 100644 --- a/android/src/main/kotlin/com/yosemiteyss/flutter_volume_controller/AudioStream.kt +++ b/android/src/main/kotlin/com/yosemiteyss/flutter_volume_controller/AudioStream.kt @@ -7,7 +7,8 @@ enum class AudioStream { SYSTEM, RING, MUSIC, - ALARM; + ALARM, + NOTIFICATION; val streamType: Int get() { @@ -17,6 +18,7 @@ enum class AudioStream { RING -> AudioManager.STREAM_RING MUSIC -> AudioManager.STREAM_MUSIC ALARM -> AudioManager.STREAM_ALARM + NOTIFICATION -> AudioManager.STREAM_NOTIFICATION } } } \ No newline at end of file diff --git a/lib/src/audio_stream.dart b/lib/src/audio_stream.dart index a6ed178..5a49d4f 100644 --- a/lib/src/audio_stream.dart +++ b/lib/src/audio_stream.dart @@ -5,10 +5,12 @@ /// [AudioStream.ring] refers to AudioManager.STREAM_RING. /// [AudioStream.music] refers to AudioManager.STREAM_MUSIC. /// [AudioStream.alarm] refers to AudioManager.STREAM_ALARM. +/// [AudioStream.notification] refers to AudioManager.STREAM_NOTIFICATION. enum AudioStream { voiceCall, system, ring, music, alarm, + notification, }