The camera & microphone is not working in custom Activity which implements JitsiMeetActivityInterface, JitsiMeetViewListener unlike the ' JitsiMeetActivity.launch(context, options)' case

Hi @saghul

After implementing this custom activity ‘onConferenceTerminated’ & ‘onConferenceJoined’ working perfectly fine.
Issue I’m facing :The camera & microphone is not working in this case unlike the ’ JitsiMeetActivity.launch(context, options)’ case.
Even its not asking for the dynamic permissions when tapping on the microphone & Camera icons.

Any guess on the issue?

Custom Activity:-

'public class JitsiCallActivity extends FragmentActivity implements JitsiMeetActivityInterface, JitsiMeetViewListener {
private JitsiMeetView view;

@Override
protected void onActivityResult(
        int requestCode,
        int resultCode,
        Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    JitsiMeetActivityDelegate.onActivityResult(
            this, requestCode, resultCode, data);
}

@Override
public void onBackPressed() {
    JitsiMeetActivityDelegate.onBackPressed();
}

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    view = new JitsiMeetView(this);
    JitsiMeetConferenceOptions options = getOptions();
    view.join(options);

    setContentView(view);
    view.setListener(this);
}

@Override
protected void onDestroy() {
    super.onDestroy();

    view.dispose();
    view = null;

    JitsiMeetActivityDelegate.onHostDestroy(this);
}

@Override
public void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
    JitsiMeetActivityDelegate.onNewIntent(intent);
}

@Override
public void onRequestPermissionsResult(
        final int requestCode,
        final String[] permissions,
        final int[] grantResults) {
    JitsiMeetActivityDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);
}

@Override
protected void onResume() {
    super.onResume();

    JitsiMeetActivityDelegate.onHostResume(this);
}

@Override
protected void onStop() {
    super.onStop();

    JitsiMeetActivityDelegate.onHostPause(this);
}

@Override
public void requestPermissions(String[] strings, int i, PermissionListener permissionListener) {

}

protected JitsiMeetConferenceOptions getOptions(){
    URL serverURL;
    try {
        serverURL = new URL(KeyValues.JITSI_MEET_HOST);
    } catch (MalformedURLException e) {
        e.printStackTrace();
        throw new RuntimeException("Invalid server URL!");
    }
    JitsiMeetUserInfo userInfo = new JitsiMeetUserInfo();
    userInfo.setDisplayName("user");


    return  new JitsiMeetConferenceOptions.Builder()
            .setServerURL(serverURL)
            .setWelcomePageEnabled(false)
            .setFeatureFlag("chat.enabled",false)
            .setVideoMuted(false)
            .setUserInfo(userInfo)
            .setSubject("SAMPLE ROOM")//Set call subject here. use to display phone number here.
            .setRoom("helloall")
            .build();

}

@Override
public void onConferenceJoined(Map<String, Object> map) {

}

@Override
public void onConferenceTerminated(Map<String, Object> map) {
    Log.d("SAMPLE","TERMINATED");
    finish();
}

@Override
public void onConferenceWillJoin(Map<String, Object> map) {

}

}’

Thanks in advance!

Hi,
I think the issue is with RequestPermissions… I see you have overriden requestPermissions but didn’t passed it to the delegate. Can you try the following and check?

@Override
public void requestPermissions(String[] strings, int i, PermissionListener permissionListener) {
    JitsiMeetActivityDelegate.requestPermissions(this, strings, i, permissionListener);
}