Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] Background audio stops at random when app is placed in background #4850

Open
samkuhn opened this issue Jul 6, 2019 · 1 comment

Comments

@samkuhn
Copy link

commented Jul 6, 2019

馃悰 Bug Report

Many thanks for the background audio support in SDK v33.0.0 - This is working perfectly for us on iOS but on android devices with a recent OS the audio terminates after a short while when the app is placed in the background.

We believe this stems from not implementing playback in a foreground service as recommended by the ExoPlayer team in this presentation (from 11:30 - source code here).

Environment

Expo CLI 2.20.0 environment info:
System:
OS: macOS 10.14.3
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.14.2 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.7.0 - /opt/local/bin/watchman
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.2/10P91b - /usr/bin/xcodebuild
npmGlobalPackages:
expo-cli: 2.20.0

Expected Behavior

Background audio to continue uninterrupted on Android when app is placed in background.

Actual Behavior

Background audio stops after a few seconds to minutes.

Reproducible Demo

Third party app by David Talbot here. If run on latest OS the audio will randomly terminate when app is in background.

@samkuhn samkuhn added the bug label Jul 6, 2019

@dctalbot

This comment has been minimized.

Copy link

commented Jul 6, 2019

I've gotten a report of this (backgrounding fine until stopping after a few minutes) from a beta tester who has a Moto x4 running Android 9. I can't reproduce it on my LG LS676 running Android 6.

source for my app is here (not ejected, super easy to spin up)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can鈥檛 perform that action at this time.