Feature flags not working in Android SDK

I’m using the following code to set the feature flags.

JitsiMeetConferenceOptions.Builder currentRoomOptionsBuilder
                = new JitsiMeetConferenceOptions.Builder();

        currentRoomOptionsBuilder.setRoom(ROOM_ID);

        currentRoomOptionsBuilder.setFeatureFlag("welcomepage.enabled", false)
                .setFeatureFlag("add-people.enabled", false)
                .setFeatureFlag("invite.enabled", false)
                .setFeatureFlag("kick-out.enabled", false)
                .setFeatureFlag("security-options.enabled", false)
                .setFeatureFlag("live-streaming.enabled", false)
                .setFeatureFlag("android.screensharing.enabled", false)
                .setFeatureFlag("recording.enabled", false)
                .setFeatureFlag("video-share.enabled", false)
                .setFeatureFlag("meeting-password.enabled", false)
                .setFeatureFlag("lobby-mode.enabled", false)
                .setFeatureFlag("filmstrip.enabled", false);

And following code to start the conference.

Fragment frag=  MeetingActivity.this.getSupportFragmentManager().findFragmentById(R.id.jitsiFragment);
        if(frag!=null){

            JitsiMeet.setDefaultConferenceOptions(options);
            ((JitsiMeetFragment)frag).getJitsiView().join(currentRoomOptionsBuilder.build());
        }

But none of the feature flags apply and all options can be seen in the UI. Can someone please show me the way how to hide these options?
I’m using the following Android SDK version.

    implementation('org.jitsi.react:jitsi-meet-sdk:3.10.2') { transitive = true }

Update to the latest version (5.0.2). Many of the flags were implemented after SDK 3.

I tried. For some reason the following code snippet is not working for SDK versions after 4.0.0 or newer.

Fragment frag=  MeetingActivity.this.getSupportFragmentManager().findFragmentById(R.id.jitsiFragment);
        if(frag!=null){
          
            JitsiMeet.setDefaultConferenceOptions(options);
            Utils.Companion.log("startMeeting: true");
            Utils.Companion.log("joining to jitsiview with meeting options");
            ((JitsiMeetFragment)frag).getJitsiView().join(currentRoomOptionsBuilder.build());
        }

The fragment is always null. I have extend the JitsiMeetActivity from the Activity which has this code. I do not need to open another new activity for the conference, so I cannot use the launch method. Any idea why this isn’t working on newer versions?

The latest SDK no longer uses a Fragment in JitsiMeetActivity, you can wire the view by hand like JitsiMeetActivity does.

In JitsiMeetActivity,

protected JitsiMeetView getJitsiView() {
        JitsiMeetFragment fragment = (JitsiMeetFragment)this.getSupportFragmentManager().findFragmentById(id.jitsiFragment);
        return fragment != null ? fragment.getJitsiView() : null;
    }

it uses fragment. Is there any other way to do this? Can you please provide an example

That has changed, it no longer uses a fragment, but a view directly: jitsi-meet/JitsiMeetActivity.java at b872ea855eaffa9f1fe6c0751b753e8d5ae87e71 · jitsi/jitsi-meet · GitHub

Perhaps the easiest is to copy what our activity class does, or subclass it.

I’m using the latest mobile SDK, which is ,

implementation('org.jitsi.react:jitsi-meet-sdk:5.0.2') { transitive = true }

But it does not include this https://github.com/jitsi/jitsi-meet/blob/b872ea855eaffa9f1fe6c0751b753e8d5ae87e71/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivity.java#L150 class

When will this code be released for mobile SDK?

That’s right, that will be part of SDK 5.1.0, which will be released shortly.