-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio stops being captured on Android 12 after hanging up from a phone call #20208
Comments
can you please try to verify on this on the latest sdk verison, 47? |
@brentvatne the repo I provided in Minimal Reproducible Example is on SDK 47 and the behavior is the same. |
got it, thanks. we likely won't be investigating this any time soon because it's not a high priority for us, but if you would like to dig into it and try to submit a pr that would be welcome. alternatively, if it's high priority for you, you may want to reach out to one of our recommend consultants for help: https://expo.dev/consultants |
Thank you for filing this issue! |
I am not 100% sure, but I've changed TARGET_SDK to version 31 (Android 12) and it seems to be working now. |
I actually found the solution. It is related to running the service in the background while recording. They key tho, was to add
|
Summary
I am developing a recording app with expo-av. I've noticed recently that on Android 12 when a user picks up a call, the app keeps recording but when listening to it later, there is silence while the user was on the phone, but also after he hung up till the end of the recording. On older versions of Android, there is silence while the user was on a call, but it starts capturing audio again when he hangs up. Any idea how to fix it, so it keeps recording after a user hangs up (please note, my intention is not to capture the phone call but keep recording after the user hangs up)?
What platform(s) does this occur on?
Android
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 12.4
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.0.1 - /opt/homebrew/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 8.19.2 - /opt/homebrew/bin/npm
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
npmPackages:
expo: ^45.0.0 => 45.0.8
react: 17.0.2 => 17.0.2
react-dom: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-web: 0.17.7 => 0.17.7
react-navigation: ^4.4.4 => 4.4.4
Expo Workflow: bare
Minimal reproducible example
Here is a simple repo I prepared:
https://github.com/lniepolski/audio-recording-example
Here are the instructions again:
Run the project on Android 12 by running expo start --android
Start recording
Pick up a call or call someone
Hang up
Keep recording for a bit after hanging up
Listen to the recording- there is no audio captured after hanging up
Also note that I use bare workflow and an older version of the expo in my original project, but the result is basically the same.
The text was updated successfully, but these errors were encountered: