Start new conference from Activity

I’m using the following code snippet to start a new conference from android Activity which extends JitsiMeetActivity.

Fragment frag=  MeetingActivity.this.getSupportFragmentManager().findFragmentById(;
                Toast.makeText(mContext, "joining to a conference", Toast.LENGTH_SHORT).show();

            Utils.Companion.log("startMeeting: true");
            Utils.Companion.log("joining to jitsiview with meeting options");

This worked fine with SDK 2.8.2 and I upgraded the SDK to 5.0.0 and now the fragment is always null.