Description
Problem
The app cannot stream audio from the microphone to the LiveKit server on certain Android devices, particularly older devices and some brands. This behavior is not related to microphone hardware, as i tried to set test audio on loop in the AudioSource and it works on most devices but fails on few devices i found listed below.
Affected Devices:
Motorola G20 API 30 (Firebase Test Lab)
moto g API 30 (Firebase Test Lab)
Vivo 1610 API 23 (Firebase Test Lab)
Huawei P20 Pro API 29 (Physical)
Embedded Devices Base Android API 30 (Physical)
This issue does not occur when using the native Android SDK—only with the Unity SDK.
Expected Behavior
Audio should stream properly from the microphone to the LiveKit server across all supported Android devices, regardless of brand or API level.
Actual Behavior
On some devices, audio streaming fails completely despite other devices working fine.
Steps to Reproduce
- Clone Unity Example Repository.
- Set up room token and LiveKit URL.
- Download and install Bluestacks.
- Build and Install the app in Bluestacks.
- Make a call and open the microphone.
- Test microphone functionality.
Findings and Tests Conducted
The issue reproduces on Bluestacks, mimicking behavior on the non working physical devices.
The Android SDK (https://github.com/livekit/client-sdk-android) works on all devices, including Bluestacks.
The Unity Android SDK fails on the affected devices.
Switching to a test audio loop instead of a microphone input does not fix the issue.