Force QR scanner to portrait orientation

Override the ZXing CaptureActivity orientation in the manifest to force portrait mode, preventing the scanner from switching to landscape mode.
This commit is contained in:
2025-12-27 19:22:04 -05:00
parent 67e26a095c
commit 836c870204

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mattintech.simplelogupload"> package="com.mattintech.simplelogupload">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
@@ -49,6 +50,15 @@
</intent-filter> </intent-filter>
</activity> </activity>
<!-- QR Code Scanner Activity -->
<activity
android:name="com.journeyapps.barcodescanner.CaptureActivity"
android:screenOrientation="portrait"
android:stateNotNeeded="true"
android:theme="@style/zxing_CaptureTheme"
android:windowSoftInputMode="stateAlwaysHidden"
tools:replace="screenOrientation" />
<!-- File Upload Foreground Service --> <!-- File Upload Foreground Service -->
<service <service
android:name=".service.FileUploadForegroundService" android:name=".service.FileUploadForegroundService"