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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background AudioService Stops After Receiving a Phone Call #1344

Open
drahmedgabr opened this issue Sep 28, 2024 · 0 comments
Open

Background AudioService Stops After Receiving a Phone Call #1344

drahmedgabr opened this issue Sep 28, 2024 · 0 comments
Assignees
Labels
1 backlog bug Something isn't working

Comments

@drahmedgabr
Copy link

Which API doesn't behave as documented, and how does it misbehave?

Android API: Specifically, the AudioManager or AudioService API in Android might be involved here, especially if the documentation suggests that background audio should resume after an interruption like a phone call but it fails to do so.

Misbehavior: After a phone call, the background audio service resumes for approximately 5 minutes and then unexpectedly stops. Additionally, when the audio resumes after the call and the app is reopened from the notification bar, closing the app causes the audio service to be destroyed. This behavior is inconsistent with the expected functionality where the audio service should continue running in the background.

Minimal reproduction project
The example

To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:

  1. Open the app.
  2. Start playing audio.
  3. Close the app (audio continues playing in the background).
  4. Make a phone call and end it.
  5. Wait approximately 5 minutes – the audio service will stop unexpectedly.
    Or
  6. Reopen the app from the notification.
  7. Close the app again – the audio service stops immediately.

Error messages

If applicable, copy & paste error message here, within the triple quotes to preserve formatting.

Expected behavior
Audio service should continue running in the background

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. MacOS + version]
  • Browser [e.g. chrome, safari + version]

Smartphone (please complete the following information):

  • Device: Realme 10 android 14 & pixel emulator android 14
  • OS: Android 14

Flutter SDK version
3.24.3

insert output of "flutter doctor" here

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.19045.4894], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.2.5)
! Unable to locate a Windows 10 SDK. If building fails, install the Windows 10 SDK in Visual Studio.
[√] Android Studio (version 2023.1)
[√] Android Studio (version 2023.2)
[√] VS Code (version 1.93.1)
[√] Connected device (3 available)
[√] Network resources

Additional context
Add any other context about the problem here.

@drahmedgabr drahmedgabr added 1 backlog bug Something isn't working labels Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 backlog bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants