Android Jitsi - Picture in picture not working


I am trying to integrate JitsiMeet in an Android app and I’m running into a couple of problems.
I need to have access to the listener and the 3 callbacks so I can’t use the JitsiMeetActivity directly (that one works fine obviously, but I can’t set the listener to my own activity that way)

  1. If I subclass JitsiMeetActivity, I get access to the listeners, which is fine, but the picture in picture button stops working (does nothing). Below, JActivity extends JitsiMeetActivity, there is no custom code apart from the 3 callbacks from the listener

Also, if I start it using the method described on git (jitsi git):
JActivity.launch(getContext(), JitsiConfig.getJitsiOptions(user, roomName));
This would launch using the static method from JitsiMeetActivity and it would launch JitsiMeetActivity, not my subclass (again using that method I would lose access to listeners)

I’ve started it manually like this (same as the code in the launch method but making sure my own activity fires). This breaks picture in picture, as said above.
Intent intent = new Intent(getContext(), JActivity.class);
intent.putExtra(“JitsiMeetConferenceOptions”, JitsiConfig.getJitsiOptions(user, roomName));
startActivityForResult(intent, REQUEST_CODE_JITSI);

  1. I’ve tried creating a separate activity and using the JitsiMeetView instead of the above method, but I’m having trouble first with permissions (not sure what is missing, using the code from git) and second, if the permissions are ok after multiple runs, again picture in picture is not working.

All I need is the default behaviour coupled with access to the listener so I can handle join/terminate.

Thanks a lot for the assistance.

PS: I’m also a bit confused on how to make use of a custom colorscheme.js file that would have to be sent as a bundle while building the options object. Can you suggest any way to handle this?

I’ve solved the picture in picture problem, realised I need special manifest declaration for those activities, so that problem is solved.

I could use some help converting the custom colorscheme.js file to Bundle so I can use it for the options file.

Thank you

Any Solution for the ColorScheme building

I haven’t found a solution for the color bundle, no.

Good afternoon friend, I have a similar problem with PIP in jitsi, you could share the Activity to see how you implemented it and you can also share the manifest file that you comment for permissions, it is that the app runs but by minimizing the application in The Android studio console describes an error notifying that PIP mode could not be started.

You need to add supportsPictureInPicture in the manifest

            android:supportsPictureInPicture="true" />

Thanks, it still does not work, by any chance you do not know how to disable “Connection Service integration” @saghul recommends in an issue to disable it in order to solve the problem I have, by any chance do you know how to do that? thanks for your help.

I have not run into this issue so I am not sure.

You can try some of the suggestions from this thread:


Hello @Cosmin , I have cloned the latest Android SDK and I have run both the java and the kotlin version in my android studio. I have the following issue in both the versions.

When I create a meeting, and I minimize it, the pip mode works great, but when I click the app icon, it takes me back to the start page ( where I am asked the meeting name ) when my current meeting is going on.

This doesn’t happen in the official Jitsi Meet app. In the official version, if I am in a meeting and I minimize jitsi meet, the pip mode works great and when I click jitsi meet app icon, it takes me to the current ongoing meeting.

how should i get this same behavior in my app any idea or hint.

@imrushi Please post your manifest.

Also, I think the JitsiMeet official app uses a single activity for both rooms and the video. If you minimise to PIP mode, you don’t see the rooms section behind.

I’ve used the same behavior with double activities to be able to change the room while the meet is in PIP mode and I have the same issue. Also excluding from recents causes a different issue since if you minimise while in PIP mode, you can’t go back to the video.

Hi,@Cosmin I solved the problem in normal android SDK.
By adding the below code in onResume() and add some flags to keep track of meeting.

startActivity(new Intent(this, JitsiMeetActivity.class).addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT));

In the manifest file, I have set the android:launchMode=“singleTask”.

I am having another issue I am building a meeting app in flutter using the flutter jitsi plugin. I have to pass android context to that plugin to get the same behavior

in the flutter app.

if you have any idea and suggestion to solve in flutter.

Sorry, can’t help you with flutter.

@Cosmin we have resolved it :slight_smile: @imrushi share the relevant code snippet here.

1 Like