Skip to content

Audio Management for Android SDK

Oliver Hargreaves Mar 23, 2024 8:55:11 PM

At LiveSwitch, we understand the importance of providing developers with the power to shape their applications precisely the way they envision them. Our goal is to offer a seamless development experience that marries simplicity with the potential for boundless customization. In the past, our Android SDK has been dependent on Android's traditional audio management tools, or it has required developers to craft custom sources and sinks to handle more intricate scenarios.


Today, we're thrilled to share some exciting news with our developer community: the release of a new and improved mechanism for managing audio input and output devices within the LiveSwitch Android SDK. This latest update is designed to enhance our existing audio management capabilities while preserving the flexibility developers have come to expect from LiveSwitch.


With the introduction of Android version 12, a series of significant API updates were made boosting the usability of Audio Manager—a tool crafted to provide developers with greater command over the audio states of their applications. This addition to Android's suite of developer tools offers an abstraction layer that simplifies the process of selecting and managing active microphones and speakers, as well as delivering more detailed device information.


In our Release 1.19.2, we've upgraded the LiveSwitch Android SDK to harness the power of these new features. Two key classes have been introduced to facilitate this enhanced functionality: AudioRecordSource2 and AudioManagerUtility


AudioRecordSource2 is not entirely new to LiveSwitch; it has been a part of our toolkit for some time. However, with the latest release, we've incorporated a new constructor that necessitates the inclusion of the application context. This update significantly improves lip-sync performance across various device combinations, ultimately leading to a smoother and more enjoyable experience for your customers.


AudioManagerUtility is a brand-new class that merges our traditional audio management approach with the advanced capabilities provided by Android's Audio Manager class. This utility empowers developers to switch devices by type or ID and to monitor device status changes. The LiveSwitch SDK processes these requests through a promise-based system. If the desired functionality is unsupported, the promise will be rejected, allowing developers to explore alternative methods. While this provides one approach to device management, we advise developers to explicitly check the Android version before calling the corresponding function to ensure compatibility. You can find a summary of the new functionality and the compatible SDKs in our documentation.


For more detailed information on how to integrate this new functionality into your existing projects or to incorporate it into new developments, we invite you to consult our comprehensive developer guide.

Should you have any questions about implementing these features or if you wish to suggest further enhancements, our support team is ready to assist you. Reach out to us at, and let's make your audio management experience with LiveSwitch even better.