如何知道 JitsiMeetActivity 已经离开?

huangapple go评论63阅读模式
英文:

How can I know a JitsiMeetActivity is left?

问题

我正在尝试实现这个场景:用户收到一个Jitsi会议呼叫请求。在接受请求后,房间名称传递给用户,然后启动新的JitsiMeetActivity。代码在这一部分起作用。我能够加入对话。现在我想做的是,加入会议通话后,如果用户想要离开通话,那么应该启动另一个活动。如果我能知道用户何时离开通话,我就可以做到这一点。

如果存在像JitsiMeetActivity.isActive()这样的方法或类似的东西,那会很有帮助。

代码:

if (room_name.length() > 0) {
    JitsiMeetConferenceOptions options
            = new JitsiMeetConferenceOptions.Builder()
            .setRoom(room_name)
            .build();

    JitsiMeetActivity.launch(this, options);
}

// 现在如果通话结束
Intent ac = new Intent(this, nextActivity.class);
startActivity(ac);
英文:

I am trying to implement this scenario: A user receives a Jitsi Conference Call request. After accepting the request, the room name is passed to the user and a new JitsiMeetActivity is launched. The code works until here. I am able to join in on a conversation. Now the thing I want to do is, after joining a conference call if the user wants to leave the call then another activity should start. If I can know when the user leaves the call I can do this.

If a method or some sort like JitsiMeetActivity.isActive() exists, it would be helpful.

The code:

if (room_name.length() > 0) {
            JitsiMeetConferenceOptions options
                    = new JitsiMeetConferenceOptions.Builder()
                    .setRoom(room_name)
                    .build();

            JitsiMeetActivity.launch(this, options);
        }
        
        //Now if the call ends
        Intent ac = new Intent(this, nextActivity.class);
        startActivity(ac);

答案1

得分: 0

我通过创建一个新的活动并从中实现JitsiMeetActivityInterfaceJitsiMeetViewListener来解决了这个问题。因此,每当我想结束一个会议时,我都可以访问onConferenceTerminated方法。

英文:

I solved this by creating a new activity and implementing JitsiMeetActivityInterface, JitsiMeetViewListener from it. Thus, whenever I want to end a conference, I have access to onConferenceTerminated method.

huangapple
  • 本文由 发表于 2020年10月12日 17:18:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/64314975.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定