[mobile app] How to pass parameters when closing the conference?

Hi everyone, especially @damencho and @saghul,

On our custom Android app we want to notify some informations when the confercence ends.
The purpose is to pass a value when the USER_LEFT event occurs.

Our Activity override the method
public void onConferenceTerminated(Map<String, Object> data)
inherited from JitsiMeetActivity

Currently the ‘data’ parameter is a Map which contains only the “url” key. What we need is to add a new custom key to it.
How can I achieve it? Which files must I modify in Jitsi?

Thanks for any hint.

PS: my question concerns Android, but I assume the change inside Jitsi will affect iOS also in the method - (void)conferenceTerminated:(NSDictionary *)data

That event comes from the XMPP leave operation. Not sure we can add metadata in there. What kind of information would you want to add there?

Hi,

I managed to find in the file mobile / external-api / middleare.js the _sendConferenceEvent method where I can add the data that interest me and these end up in the onConferenceTerminated Map. Tested and it works.

What is the ultimate goal?
The answer is simple: I want to know when the moderator leaves room to throw the participant out.

Marco

We now have onParticipantLeft events, which will tell you when a participant leaves.

Thanks Saghul!

Another curiosity … the ‘extraData’ parameter of the method

protected void onParticipantLeft (HashMap <String, Object> extraData)

also contains the role of the user who has abandoned?
Unfortunately I can’t check right away because we are behind with the code and we still have to align.

Thanks again !
Marco

Yes, it should have that.

1 Like