Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
5.4k views
in Technique[技术] by (71.8m points)

android - Agora SDK : Can we add new member in ongoing 1-1 call?

We are building calling app in Android using Agora SDK. We checked this samples :

https://github.com/AgoraIO/Basic-Video-Call

in our app, 2 users can do video call. We are using this sample : https://github.com/AgoraIO/Basic-Video-Call/tree/master/One-to-One-Video/Agora-Android-Tutorial-Kotlin-1to1

For the group call, we followed this sample : https://github.com/AgoraIO/Basic-Video-Call/tree/master/Group-Video/OpenVideoCall-Android

We are trying to implement group call in this way :

  1. User-A calls User-B

  2. Both gets connected (using https://github.com/AgoraIO/Basic-Video-Call/tree/master/One-to-One-Video/Agora-Android-Tutorial-Kotlin-1to1)

  3. User-B can able to invite more users in a ongoing video call.

Does this possible? Please suggest us a correct way?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For a call invitation scenario, you will need to leverage some sort of signaling solution. Agora.io provides the RTM SDK that you can use alongside the Agora RTC SDK. You can refer to Agora's guide to see how the implementation works: https://docs.agora.io/en/Real-time-Messaging/rtm_invite_android?platform=Android

This is how you would actually create the invitation

void inviteCall(final String peerUid, final String channel) {
    // Creates LocalInvitation
    LocalInvitation invitation = RtmCallManager.createLocalInvitation(peerUid);
    invitation.setContent(channel);
    // Sends call invitation
    RtmCallManager.sendLocalInvitation(invitation);
}

You will also need to use something like Android's ConnectionService to be able to implement call notification. Here's an guide on call notification: https://docs.agora.io/en/Real-time-Messaging/faq/call_invite_notification


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...