Skip to content

0.4.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@Alton09 Alton09 released this 14 Aug 22:00
· 57 commits to master since this release
ce282dd

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()