Closed noobiewoobie closed 3 months ago
Please try updating to 10.0.0
I tried the updated sdk. The only fix in the sdk is that a new method has been added for setting an arraylist of buttons.The broadcasted event has not been checked. On clicking the button an event of type CUSTOM_MENU_BUTTON_PRESSED is broadcasted but the sdk has CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED so catching this event is not possible.
You can check how this is implemented here https://github.com/jitsi/jitsi-meet-sdk-samples/tree/master/android. Maybe you missed something.
No I did not miss anything. After changing to 10.0.0 , I was able to add extra buttons and perform clicks but the event type is not in the sdk. So, I am not receiving the event. Infact here's the log when a button is pressed you can check the event type:
ExternalAPI Sending event: CUSTOM_MENU_BUTTON_PRESSED with data: {"text":"Button two","id":"btn2"}
and this is in the sdk
I think what you are looking for is CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED. https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-android-sdk#custom_overflow_menu_button_pressed
Well what I want is to simply add some custom buttons and be able to handle their clicks. Firstly the issue was that the sdk didn't had any method for setting multiple buttons using an arraylist and now when it does have then it's sending the event as an action type which is not even present in the sdk. Latest sdk sends the click event as CUSTOM_MENU_BUTTON_PRESSED and the sdk doesn't have that defined in it's action types. So, can you tell me which sdk version has it working fine. Where I can add the buttons and catch the click events. Also fyi , CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED is never getting sent. Everytime CUSTOM_MENU_BUTTON_PRESSED is getting sent for every button press. Can you tell me which event type should I use from the sdk to catch these click event ?
You need to use type CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED and after your custom button is clicked, it will return:
ExternalAPI Sending event: CUSTOM_MENU_BUTTON_PRESSED with data: {"text":"${text}","id":"${id}"}
I tried it and it is never received in the broadcast receiver. How will it be received when the event being sent is CUSTOM_MENU_BUTTON_PRESSED ? If the even being sent would have been CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED then using it as the type would have worked fine. On the other hand, if the sdk had CUSTOM_MENU_BUTTON_PRESSED as and event type then using it to recieve the event would have also worked. For one single event two different things are being used. If sender is sending CUSTOM_MENU_BUTTON_PRESSED , how will the receiver receive CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED ? It's as simple as that.
You're right. Because of the naming difference the event is only being sent but never received.
So , I guess this feature cannot be used untill it gets fixed. Possibly in the next update!! ??
Can you try updating to 10.0.1 and test it. Thank you!
yes it works now
I followed the instructions provided in the guide for android implementation at https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-android-sdk#jitsimeetconferenceoptions for adding custom buttons in the tool bar.
But I guess the information in the guide is outdated. Because it shows adding custom tool bar buttons using an Arraylist of bundle. But when I try to add buttons same way the sdk gives error because there is no such method in sdk which allows setting config using an arraylist.
So how can I add multiple custom buttons ? Or do I need to call the method separately with bundle for each button I want to add ? I am using latest sdk version 9.2.2