imdungnguyen
imdungnguyen

Reputation: 248

How to detect if peer leave video call by force close app

I'm following Open-Duo sample for android (From AgoraIO Github). And I got stuck in this case:

User A and user B are connecting by video call, user B close app by tap recent and click clear app. so user B close the app but User A still in call but no signal from B.

The video call is still continue but it's one side call.

How can I detect user B leave the conversation by this way?

Upvotes: 1

Views: 895

Answers (2)

Sai
Sai

Reputation: 15738

If users clear/swipe from recent, you will get a callback called onTaskRemoved in your service, using this callback you can send a signal to User A before you destroy it.

Note: For this, to work you need to move your signaling code to a service.

Upvotes: 2

Galaxy
Galaxy

Reputation: 1279

From the perspective of A, under this situation, the behaviors of B between accidentally leave and network down have no difference:

  • A will not know B is gone untill time is out.
  • A will not know B is gone for what.
  • B can rejoin into the old channel once the App get restarted or network is up.

Upvotes: 0

Related Questions