journeyapps / zxing-android-embedded

Barcode scanner library for Android, based on the ZXing decoder
https://journeyapps.com/
Apache License 2.0
5.74k stars 1.27k forks source link

Targeting sdk version 31 require <activity> declare android:exported #718

Open robert0ng opened 2 years ago

robert0ng commented 2 years ago

Description of the problem:

I've found in merged AndroidManifest.xml there is a activity which we can't add android:exported=false to it. This will cause app can't be installed. Is there anyway we can modify this?

<activity
            android:name="com.journeyapps.barcodescanner.CaptureActivity"
            android:clearTaskOnLaunch="true"
            android:screenOrientation="sensorLandscape"
            android:stateNotNeeded="true"
            android:theme="@style/zxing_CaptureTheme"
            android:windowSoftInputMode="stateAlwaysHidden" />

Which library version are you using? E.g. 3.2.0.

4.3.0

Which phone/tablet are you using, and which Android version does it run? (e.g. Samsung Galaxy S5, Android 5.0)

Pixel 4a

Does the same happen on other devices or an emulator?

Yes

crazyserver commented 2 years ago

Same problem here! https://github.com/journeyapps/zxing-android-embedded/pull/680