0.4.0
Pre-release
Pre-release
Enhancements
- Added a constructor parameter to enable logging. This argument is disabled by default.
val audioSwitch = AudioSwitch(context, loggingEnabled = true)
audioSwitch.start { _, _ -> }
- Added another constructor parameter that allows developers to subscribe to system audio focus changes while the library is activated.
val audioSwitch = AudioSwitch(context, audioFocusChangeListener = OnAudioFocusChangeListener { focusChange ->
// Do something with audio focus change
))}
audioSwitch.start { _, _ -> }
// Audio focus changes are received after activating
audioSwitch.activate()