In code example 3, it seems that the orientation is fixed in the manifest. Just leave it blank (not even configured for a portrait)
<activity android:windowSoftInputMode="stateHidden" android:name="net.majorkernelpanic.example3.MainActivity" android:label="@string/app_name" android:theme="@android:style/Theme.DeviceDefault.Wallpaper.NoTitleBar">
This will allow your activity to change orientation.
To strengthen the orientation, add below the line at the end of onCreate (after the line selectQuality(); )
mSession.setPreviewOrientation(90); mSession.configure();
source share