Jitsi-meet: Android: Setting feature flag for picture in picture does not work on android.

Created on 30 Jul 2019  路  21Comments  路  Source: jitsi/jitsi-meet

Tested on the test app, i set the .setFeatureFlag("pip.enabled",false) and the conversation still goes into Picture in picture mode.

android wontfix

Most helpful comment

Android Go doesn鈥檛 support PiP, it鈥檚 a platform limitation. I noticed this after testing an Android Go device, and current master won鈥檛 have PiP available on those devices. This change is not on a released SDK version yet though.

All 21 comments

When pressing the back button or does the downwards arrow show in the UI?

Downwards arrow is there in the ui, also home button and back button puts it to PiP mode.
Tried setting another feature flag, chat.enbaled that worked perfectly.

JitsiMeetConferenceOptions defaultOptions = new JitsiMeetConferenceOptions.Builder() .setServerURL(serverURL) .setFeatureFlag("chat.enabled", false) .setFeatureFlag("pip.enabled",false) .setWelcomePageEnabled(false) .build(); JitsiMeet.setDefaultConferenceOptions(defaultOptions);
Screenshot_20190730-132104

If the arrow is there is means the flag wasn't properly applied. Thanks, this helps troubleshooting the problem. I'll try to take a look soon.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

is there any flag to enable screen share feature in the app?. Please let me know.

I am trying to disable the picture in picture mode from jitsi SDK using the following snippet : ".setFeatureFlag("chat.enabled", false)"., but this is not working. Please Help me, as I am developing a native android application

is there any flag to enable screen share feature in the app?. Please let me know.

That feature is not implemented yet.

I am trying to disable the picture in picture mode from jitsi SDK using the following snippet : ".setFeatureFlag("chat.enabled", false)"., but this is not working. Please Help me, as I am developing a native android application

You need to use the right feature flag, that one is about chat.

I had to uninstall my app before running it again to see the picture-in-picture mode disabled after adding the flag. Hope this can help.

Instead of settingPIP flag on setDefaultConferenceOptions set the PIP flag on the conference option which you pass to getJitsiView().join();

JitsiMeetUserInfo jitsiMeetUserInfo = new JitsiMeetUserInfo();
        jitsiMeetUserInfo.setDisplayName(AppConstants.NAME);
        JitsiMeetConferenceOptions options
                = new JitsiMeetConferenceOptions.Builder()
                .setRoom(AppConstants.MEETINGID)
                .setFeatureFlag("pip.enabled", false)
                .setUserInfo(jitsiMeetUserInfo)
                .build();
getJitsiView().join(options);

This will disable the PIP feature and remove the down arrow from the meeting view.

I have problems with the implementation of the SDK in Android and your comments would be very helpful, it turns out that I cannot access PIP mode, the Android Studio console shows me an error message when trying to minimize the application to enter PIP mode, the message notifies me that PIP mode cannot be accessed, I appreciate your help, I don't know if you can share your MainActivity to check if I was wrong somewhere. @saghul

Can you please paste the full error message and the code you have which triggers it?

Can you please paste the full error message and the code you have which triggers it?

AndroidManifest.xml

        <activity android:name=".MainActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
            android:launchMode="singleTask"
            android:resizeableActivity="true"
            android:supportsPictureInPicture="true"
            android:windowSoftInputMode="adjustResize"></activity>

activity_main.xml

<fragment
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:name="org.jitsi.meet.sdk.JitsiMeetFragment"
    android:id="@+id/jitsiFragment"/>

MainActivity.java

public class MainActivity extends FragmentActivity implements JitsiMeetActivityInterface {
    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 = new JitsiMeetConferenceOptions.Builder()
                .setRoom("https://meet.jit.si/test123")
                .build();
        view.join(options);

        setContentView(view);
    }

    @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
    protected void onUserLeaveHint() {
        view.enterPictureInPicture();
    }

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

    }
}

The error occurs in this part of the MainActivity.java code.

    protected void onUserLeaveHint() {
        view.enterPictureInPicture();
    }

Captura de Pantalla 2020-07-24 a la(s) 9 22 55 p 聽m

The error is described in the attached image, I would appreciate your help

@saghul

@saghul , in an issues you comment that they deactivate "Connection Service integration" in order to make the PIP work, but I am not very clear where I can deactivate that option, when I open the application on my cell phone a phone appears emitting a signal as if it were making a call, when I'm only in the video chat room alone, in the issues the user had the same problem myself and asked him to deactivate the "Connection Service integration", could you please explain to me how I can deactivate it, if it's any configuration of the jitsi, any project level configuration that I have to do? Thanks for your help.

That option is not related to PiP, must be something else.

What does your AndroidManifest.xml look like? You need to have some options there in order for pip to work.

 <activity android:name=".MainActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
            android:launchMode="singleTask"
            android:resizeableActivity="true"
            android:supportsPictureInPicture="true"
            android:windowSoftInputMode="adjustResize"></activity>

@saghul

That looks about right. What Android version are you running? Does it happen to be Android Go?

That looks about right. What Android version are you running? Does it happen to be Android Go?

I have android 8.1.0 and all the apps are Go, does that result in a problem?

Android Go doesn鈥檛 support PiP, it鈥檚 a platform limitation. I noticed this after testing an Android Go device, and current master won鈥檛 have PiP available on those devices. This change is not on a released SDK version yet though.

If the arrow is there is means the flag wasn't properly applied. Thanks, this helps troubleshooting the problem. I'll try to take a look soon.

If the arrow is there is means the flag wasn't properly applied. Thanks, this helps troubleshooting the problem. I'll try to take a look soon.

@saghul Is this issue resolved. I am still facing the same issue. Any solution for this issue?

It should be, yeah. What problem are you running into? What SDK version are you using?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kangzhe0000 picture kangzhe0000  路  39Comments

kinnla picture kinnla  路  40Comments

svtagt picture svtagt  路  55Comments

edmundlaugasson picture edmundlaugasson  路  36Comments

niallmurphy-ie picture niallmurphy-ie  路  45Comments