amazon-chime-sdk-android icon indicating copy to clipboard operation
amazon-chime-sdk-android copied to clipboard

The chime video/audio call gets disconnected after having a phone call or WhatsApp/IMO call in android 12

Open ar5-rehman opened this issue 2 years ago • 18 comments

The chime video/audio call gets disconnected after having a phone call or WhatsApp/IMO call in android 12.

To Reproduce Steps to reproduce the behavior:

  1. Chime video/audio call started.
  2. Receive a phone call or Whatsapp/IMO call.
  3. First the Audio will be paused and after the user ends the phone call or Whatsapp/IMO call, the audio of chime is still be paused and the call gets disconnected after a minute.

Expected behavior The Chime audio/video call gets resumed after having a phone call or Whatsapp/IMO call.

Logs 1.When user receive a phone call or Whatsapp call, the Chime method onAttendeesMuted gets called. "onAttendeesMuted fun called- muted to self- attendeeIdSelf: $attendeeIdLocalUser" 2.Then onAudioSessionStopped methods gets called "onAudioSessionStopped fun called- closeActivity called ${MeetingSessionStatusCode.OK}"

Screenshots https://prnt.sc/vGKKsouyz2N0

Here is the video demo of call get's end: https://share.vidyard.com/watch/GH9ABK5RmBqSvC9h9jT23p

Test environment Info

  • Device: VIVO y33s
  • OS: Android 12
  • Version amazon-chime-sdk: v0.17.1
  • Version amazon-chime-sdk-media: v0.17.1

Additional context N/A

ar5-rehman avatar Jun 10 '22 10:06 ar5-rehman

You may need to reconnect the audio session.

dingyishen-amazon avatar Jun 13 '22 07:06 dingyishen-amazon

@dingyishen-amazon Thanks for your response, but it's working for android versions 8 9 10, and 11 but not working only for android 12, that's why I post it.

ar5-rehman avatar Jun 14 '22 04:06 ar5-rehman

Hi @ar5-rehman,

Could you verify you can reproduce it with the demo app, I'm not able to reproduce it on my end. Also, are you able to reproduce it with other Android 12 devices?

georgezy-amzn avatar Jun 15 '22 17:06 georgezy-amzn

@dingyishen-amazon hi,

Yes, I am facing this issue in android 12. The audio stopped callback called and the audio stops working.

ar5-rehman avatar Jun 16 '22 05:06 ar5-rehman

The audio stopped callback called and the audio disconnected, no other callback method called, how can i reconnect it then? But keep in mind that the issue is in Android 12 only. Thanks

ar5-rehman avatar Jun 16 '22 07:06 ar5-rehman

You should be able to reconnect by calling meetingSession.audioVideo.start().

georgezy-amzn avatar Jun 16 '22 17:06 georgezy-amzn

@georgezy-amzn Thanks for the suggestion but in Android 8 9 10 and 11 the call automatically resumes after having the phone/whatsapp call, but not in android 12 version.

ar5-rehman avatar Jun 17 '22 09:06 ar5-rehman

@ar5-rehman

  • Please share me the stack trace where onAudioSessionStopped is called, and the logs.
  • Please try to reproduce it with the demo app, this can help us identify if the issue happens only on some specific devices.
  • Since the MeetingSessionStatusCode is OK, it could be logic error in your app, remove all code that stop the call, see if it still happens.

georgezy-amzn avatar Jun 17 '22 17:06 georgezy-amzn

@georgezy-amzn

Actually its's only Android 12 devices issues in other versions its working very fine, the audio stopped first, since Since the MeetingSessionStatusCode is not OK.

onAudioSessionStopped method called and call disconnected.

override fun onAudioSessionStopped(sessionStatus: MeetingSessionStatus) {
        if (sessionStatus.statusCode != MeetingSessionStatusCode.OK) {

            Log.i(
                tag,
                "onAudioSessionStopped fun called- closeActivity called ${MeetingSessionStatusCode.OK}"
            )
        }
    }

ar5-rehman avatar Jun 18 '22 16:06 ar5-rehman

@georgezy-amzn

I tried with the demo app as the well same thing happened the call disconnected after having WhatsApp call in between our meeting on Chime SDK.

Here are the logs:

2022-06-19 10:02:31.195 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: meetingStartRequested {"timestampMs":1655614950979,"deviceName":"vivo V2109","deviceManufacturer":"vivo","deviceModel":"V2109","mediaSdkVersion":"0.17.1","osName":"Android","osVersion":"12","sdkName":"amazon-chime-sdk-android","sdkVersion":"0.17.1","meetingId":"41147cb0-3496-4672-8564-2eeb7d480706","attendeeId":"1e29c94b-97f0-b856-3cf0-52c8fc865ca4","externalUserId":"person-clinicenternal3504","externalMeetingId":"person-clinicenternal851"}
2022-06-19 10:02:31.196 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: [Function] [onAudioSessionStartedConnecting]: reconnecting: false
2022-06-19 10:02:31.515 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: [Function] [onVideoSessionStartedConnecting]: 
2022-06-19 10:02:48.887 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: meetingStartSucceeded {"timestampMs":1655614968871,"maxVideoTileCount":0,"retryCount":0,"poorConnectionCount":0,"meetingDurationMs":1,"meetingStartDurationMs":17892,"deviceName":"vivo V2109","deviceManufacturer":"vivo","deviceModel":"V2109","mediaSdkVersion":"0.17.1","osName":"Android","osVersion":"12","sdkName":"amazon-chime-sdk-android","sdkVersion":"0.17.1","meetingId":"41147cb0-3496-4672-8564-2eeb7d480706","attendeeId":"1e29c94b-97f0-b856-3cf0-52c8fc865ca4","externalUserId":"person-clinicenternal3504","externalMeetingId":"person-clinicenternal851"}
2022-06-19 10:02:48.890 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: Meeting started on : {"deviceName":"vivo V2109","deviceManufacturer":"vivo","deviceModel":"V2109","mediaSdkVersion":"0.17.1","osName":"Android","osVersion":"12","sdkName":"amazon-chime-sdk-android","sdkVersion":"0.17.1","meetingId":"41147cb0-3496-4672-8564-2eeb7d480706","attendeeId":"1e29c94b-97f0-b856-3cf0-52c8fc865ca4","externalUserId":"person-clinicenternal3504","externalMeetingId":"person-clinicenternal851"}
2022-06-19 10:02:48.898 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: [Function] [onAudioSessionStarted]: reconnecting: false
2022-06-19 10:02:49.633 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: [Function] [onVideoSessionStarted]: OK
2022-06-19 10:02:52.226 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: Video tile added, tileId: 1, attendeeId: a70f9100-fcec-75e3-4aa6-c07280cf5f12, isContent false with size 0*0
2022-06-19 10:02:58.495 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: Video stream content size changed to 960*540 for tileId: 1
2022-06-19 10:02:58.497 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: [Function] [onVideoTileResumed]: person-clinicenternal3505 video resumed
2022-06-19 10:03:18.334 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: Video track removed, tileId: 1, attendeeId: a70f9100-fcec-75e3-4aa6-c07280cf5f12
2022-06-19 10:03:26.680 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: Video tile added, tileId: 1, attendeeId: a70f9100-fcec-75e3-4aa6-c07280cf5f12, isContent false with size 0*0
2022-06-19 10:03:48.491 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: meetingFailed {"timestampMs":1655615028481,"maxVideoTileCount":1,"retryCount":0,"poorConnectionCount":0,"meetingDurationMs":59611,"meetingStartDurationMs":17892,"deviceName":"vivo V2109","deviceManufacturer":"vivo","deviceModel":"V2109","mediaSdkVersion":"0.17.1","osName":"Android","osVersion":"12","sdkName":"amazon-chime-sdk-android","sdkVersion":"0.17.1","meetingId":"41147cb0-3496-4672-8564-2eeb7d480706","attendeeId":"1e29c94b-97f0-b856-3cf0-52c8fc865ca4","externalUserId":"person-clinicenternal3504","externalMeetingId":"person-clinicenternal851"}
2022-06-19 10:03:48.497 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: Meeting history: [{"meetingHistoryEventName":"meetingStartRequested","timestamp":1655614950979},{"meetingHistoryEventName":"meetingStartSucceeded","timestamp":1655614968871},{"meetingHistoryEventName":"audioInputSelected","timestamp":1655614969607},{"meetingHistoryEventName":"meetingFailed","timestamp":1655615028481}]
2022-06-19 10:03:48.610 14520-14520/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: [Function] [onAudioSessionStopped]: null

Thanks

ar5-rehman avatar Jun 19 '22 05:06 ar5-rehman

@georgezy-amzn

Actually its's only Android 12 devices issues in other versions its working very fine, the audio stopped first, since Since the MeetingSessionStatusCode is not OK.

onAudioSessionStopped method called and call disconnected.

override fun onAudioSessionStopped(sessionStatus: MeetingSessionStatus) {
        if (sessionStatus.statusCode != MeetingSessionStatusCode.OK) {

            Log.i(
                tag,
                "onAudioSessionStopped fun called- closeActivity called ${MeetingSessionStatusCode.OK}"
            )
        }
    }

One thing I'm not quite get is why not just print out the statusCode but print OK even when the condition is statusCode is NOT OK?

linsang21 avatar Jun 22 '22 22:06 linsang21

@linsang21 Hi, leave that code that's not important actually, i provided the logs of your demo app, where i am still facing the same issue.

ar5-rehman avatar Jun 23 '22 03:06 ar5-rehman

Sure, but I also tested with the latest demo app as today with Pixel 6 Android 12, couldn't reproduce the reported issue. Steps along with log:

// Android joined meeting
2022-06-23 15:12:09.542 23790-23790/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: meetingStartRequested {"timestampMs":1656022329450,"meetingId":"91200c72-afbd-42ab-9cb8-0438b34e0706","attendeeId":"3fa976c1-1a3d-9851-bc7e-6d424adc442e","deviceName":"Google Pixel 6","deviceManufacturer":"Google","deviceModel":"Pixel 6","mediaSdkVersion":"0.17.1","osName":"Android","osVersion":"12","sdkName":"amazon-chime-sdk-android","sdkVersion":"0.17.2","externalUserId":"5e5a1fd4#t","externalMeetingId":"ccc"}
2022-06-23 15:12:09.542 23790-23790/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: [Function] [onAudioSessionStartedConnecting]: reconnecting: false
2022-06-23 15:12:09.680 23790-23790/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: [Function] [onVideoSessionStartedConnecting]: 
2022-06-23 15:12:09.864 23790-23790/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: meetingStartSucceeded {"timestampMs":1656022329860,"maxVideoTileCount":0,"retryCount":0,"poorConnectionCount":0,"meetingDurationMs":0,"meetingStartDurationMs":410,"meetingId":"91200c72-afbd-42ab-9cb8-0438b34e0706","attendeeId":"3fa976c1-1a3d-9851-bc7e-6d424adc442e","deviceName":"Google Pixel 6","deviceManufacturer":"Google","deviceModel":"Pixel 6","mediaSdkVersion":"0.17.1","osName":"Android","osVersion":"12","sdkName":"amazon-chime-sdk-android","sdkVersion":"0.17.2","externalUserId":"5e5a1fd4#t","externalMeetingId":"ccc"}
2022-06-23 15:12:09.864 23790-23790/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: Meeting started on : {"deviceName":"Google Pixel 6","deviceManufacturer":"Google","deviceModel":"Pixel 6","mediaSdkVersion":"0.17.1","osName":"Android","osVersion":"12","sdkName":"amazon-chime-sdk-android","sdkVersion":"0.17.2","meetingId":"91200c72-afbd-42ab-9cb8-0438b34e0706","attendeeId":"3fa976c1-1a3d-9851-bc7e-6d424adc442e","externalUserId":"5e5a1fd4#t","externalMeetingId":"ccc"}
2022-06-23 15:12:09.865 23790-23790/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: [Function] [onAudioSessionStarted]: reconnecting: false
2022-06-23 15:12:10.432 23790-23790/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: [Function] [onVideoSessionStarted]: OK
2022-06-23 15:12:10.433 23790-23790/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: [Function] [onAttendeesMuted]: Attendee with attendeeId 5584dba5-a2ec-345e-81f9-bddf2f0175b4 and externalUserId ce8b7092#Sang muted
// Phone call made to the Android phone, picked up and hold for more than 2 mins

// Hang up the phone, back to the demo app, seeing connection is still going on, turn the video on and off
2022-06-23 15:16:02.798 23790-23790/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: Video tile added, tileId: 0, attendeeId: 3fa976c1-1a3d-9851-bc7e-6d424adc442e, isContent false with size 720*1280
2022-06-23 15:16:02.951 23790-23790/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: Video stream content size changed to 540*960 for tileId: 0
2022-06-23 15:16:04.336 23790-23790/com.amazonaws.services.chime.sdkdemo I/MeetingFragment: Video track removed, tileId: 0, attendeeId: 3fa976c1-1a3d-9851-bc7e-6d424adc442e

I guess this could be device specific issue. We could try with VIVO y33s as well.

linsang21 avatar Jun 23 '22 22:06 linsang21

@linsang21 it's interesting to see, yes please try it with Vivo y33s, after the .resume the chime call waits for at least two minutes and check whether it's disconnected or not.

Thanks

ar5-rehman avatar Jun 24 '22 04:06 ar5-rehman

@linsang21 have you tested on Vivo y33s device? I am looking forwards for results.

ar5-rehman avatar Jun 30 '22 13:06 ar5-rehman

Sadly, we don't have that device, do you have any other device models that is having similar issue?

hokyungh avatar Jul 07 '22 23:07 hokyungh

@hokyungh @linsang21 @dingyishen-amazon @georgezy-amzn Hi guys, i tried with vivo y33s(Android 12), Samsung M21(Android 12), and Samsung A13(Android 12), but stills call drops after having phone call during the chime call.

I test the app in Google Pixel 6, and it's working too at my end, please test with the above specific devices on which the SDK is having issue i reported. Thanks

ar5-rehman avatar Jul 16 '22 06:07 ar5-rehman

Hi @ar5-rehman,

Since MeetingSessionStatusCode is null in the log you shared, it could be a code that is not being handled in SDK. Could you turn on warn log level, and reproduce the issue again? You should be able to see a log produced by this line, please share us the log.

georgezy-amzn avatar Dec 16 '22 02:12 georgezy-amzn

Closing this old ticket as there's been no further activity. Please feel free to reopen or submit a support case in AWS console.

yochum avatar Jun 05 '24 19:06 yochum