aws / amazon-chime-sdk-android

An Android client library for integrating multi-party communications powered by the Amazon Chime service.
https://aws.amazon.com/chime/chime-sdk/
Apache License 2.0
105 stars 49 forks source link

Audio - Video transmitting on receiving calls #122

Open mj8894 opened 4 years ago

mj8894 commented 4 years ago

After joining a meeting, If a user receives a call over his/her phone, The meeting does not go to a halt and the voice from the call is audible in the meeting and vice versa.

To Reproduce

  1. Join a meeting
  2. Accept a call on your phone while being on the meeting
  3. Your voice can be heard on the meeting as well as the meeting audio can be heard on the call

Expected behavior There should be an option to pause the call audio and video completely in case a call is received and then resume once the call ends.

Test environment Info (please complete the following information):

linsang21 commented 4 years ago

Hi, I followed the reproduce steps on a S9 Android 10 device but not able to replay the situation Your voice can be heard on the meeting, which means I can only hear the voice from the phone call not from meeting. Could you share more detail on the testing env?

My reproduce steps: (using the 0.7.3 sdk and 0.6.2 media sdk)

For the meeting audio can be heard on the call, I don't think we support pause a meeting for an incoming phone call. One workaround I can think of is for application to handle the phone call event by stopping the meeting session, and rejoin the meeting session after the phone call is ended.

mj8894 commented 4 years ago

Hi,

We tested several cases , however every time our voice from the call could be heard on other devices who had joined the meeting. Regarding meeting audio on the call, would be great if we have support for pausing the remote audio via code or pause the entire meeting altogether if required.

sagarpatel288 commented 3 years ago

@mj8894 I am late in the party but Another workaround I can think of is inspired from:

Application lifecycle event, AudioFocusChangeListener and Don't be noisy honey.

So, when the application is going in the background while we are talking over the phone call and if the meeting is already going on, we will mute ourselves for the chime meeting.

Similarly, when our chime application comes in the foreground and if the meeting is live, we will unmute ourselves.

Also, we can use various audio constants (objective/intention) to control audio behaviour.

Posted here so that someone having a similar issue can have a couple of options to try

linsang21 commented 3 weeks ago

One of the properer designs could be handling the phone call interruption by leaving / rejoining the sdk meeting, utilize the ConnectionService that allows your app to listen to there's a incoming call.