GetStream / stream-video-android

📲 Android Video SDK. Stream's versatile Core + Compose UI component libraries that allow you to build video calling, audio room, and, live streaming apps based on Webrtc running on Stream's global edge network.
https://getstream.io/video/docs/android
Other
386 stars 39 forks source link

Call is finished after reconnecting to WiFi network on client app #1172

Open Miara opened 2 months ago

Miara commented 2 months ago

Describe the bug Something is broken with reconnecting a network during call (when network is disabled and enabled).

❗️It doesn't happen in your demo-app , but it happens in my app, although I used as simple as possible code from your SDK ❗️It happens only on WiFi! But it doesn't happen with reconnecting to mobile network.

I prepared extremely simple calling activity, using only your SDK's code:

{
@OptIn(StreamCallActivityDelicateApi::class)
class CallActivity : ComposeStreamCallActivity() {

    override val uiDelegate: StreamActivityUiDelegate<StreamCallActivity> = StreamCallActivityComposeDelegate()
    override val configuration: StreamCallActivityConfiguration =
        StreamCallActivityConfiguration(closeScreenOnCallEnded = false)
}
}

Declaration in AndroidManifest:

<activity  
  android:name=".CallActivity"  
  android:supportsPictureInPicture="true"  
  android:showOnLockScreen="true"  
  android:showWhenLocked="true"  
  android:launchMode="singleTop"  
  android:exported="false">  
 <intent-filter android:priority="1">  
 <action android:name="io.getstream.video.android.action.INCOMING_CALL" />  
 <action android:name="io.getstream.video.android.action.NOTIFICATION" />  
 <action android:name="io.getstream.video.android.action.LIVE_CALL" />  
 <action android:name="io.getstream.video.android.action.ONGOING_CALL" />  
 <action android:name="io.getstream.video.android.action.ACCEPT_CALL" />  
 <action android:name="io.getstream.video.android.action.OUTGOING_CALL" />  
 </intent-filter></activity>

And call initialization. NOTE that when the type is "default". - then bug appears as well

startActivity(StreamCallActivity.callIntent(  
        action = NotificationHandler.ACTION_OUTGOING_CALL,  
  context = this,  
  cid = StreamCallId(if(isVideo) "video" else "audio", UUID.randomUUID().toString()),  
  members = listOf(userId),  
  clazz = CallActivity::class.java,  
))

What's weird, is that when I use same code as above in your repository instead of your CallActivity in demo-app - reconnecting works properly. It doesn't finish call nor activity.

But with the same code in my app - the call is finished. Im wondering what's going on - is that some remote config for your API Key in your repository?

I noticed that other settings declared in GetStream dashboard don't work well. For example, I have such definition for video call: speaker on by default camera on by default microphone on by default but afterwards, none of these settings is enabled when actual call is started. Microphone is off, speaker is off and camera is off.

I'm not sure if this is not separate bug, but maybe it is related to reconnecting issue due to some reconnecting timeout policies?

SDK version

To Reproduce Steps to reproduce the behavior:

  1. Start call
  2. Disconnect and connect to WiFi network
  3. Call is finished..

Expected behavior After reconnecting WiFi network, call is still continued

Device:

liviu-timar commented 2 months ago

Hi @Miara, we'll look into it as soon as possible, we'll keep you updated.

swift-io-tech commented 2 months ago

Any update on this? seems like a major bug, can re-produce this 100%

aleksandar-apostolov commented 2 months ago

This is actually a UI issue within the ComposeStreamCallActivity or rather its parent. We are going to do a release next week with a fix.

Miara commented 1 month ago

@aleksandar-apostolov any update on that one?