Suraksha Ajith
Suraksha Ajith

Reputation: 892

Force Jitsi android app to Landscape Mode Even When Device Orientation is Locked

I have downloaded the Jitsi sample app from GitHub: Jitsi Meet Android. When I start a conference call from the Android app, the phone's orientation defaults to portrait, and the orientation is locked on the device. I want my app to default to landscape mode.

I have tried the following approaches:

1) Setting Orientation in the Manifest

   <activity
       android:name=".MainActivity"
       android:screenOrientation="landscape"
       android:configChanges="orientation|screenSize|smallestScreenSize"
       android:exported="true">

2) Setting Orientation Programmatically

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
 // Rest of the code
}

After implementing these changes, the MainActivity screen's orientation is landscape. However, the screen orientation switches back to portrait after joining a conference call, as shown in the screenshot below.

How can I force the entire application, including the conference call screens, to remain in landscape mode?

enter image description here enter image description here

Upvotes: 2

Views: 105

Answers (0)

Related Questions