-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Edge to Edge handling #766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- package in AndroidManifest.xml is deprecated. Declare namespace in build.gradle instead. - R class package changed because of namespace name changed to globally unique name. - replace deprecated classifier to archiveClassifier
- `android:exported="true"` is required above Android 12
- Add kotlin android plugin to suppress ` Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found` error.
plugins { | ||
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add these lines to suppress Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found
error.
@@ -10,7 +9,8 @@ | |||
<activity | |||
android:name=".MainActivity" | |||
android:label="@string/app_name" | |||
android:theme="@style/AppTheme"> | |||
android:theme="@style/AppTheme" | |||
android:exported="true"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting Android 12, exproted="true" is needed explicitly.
@@ -14,7 +14,7 @@ | |||
See the License for the specific language governing permissions and | |||
limitations under the License. | |||
--> | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.zxing.client.android"> | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package in AndroidManifest is deprecated.
Background
Starting with target SDK 35, edge-to-edge has been enabled by default. The prompt message shown in the capture preview was being cut off because CaptureActivity didn't properly handle edge-to-edge display.
What Changed
image
I have tested this on API 24 and API 35 emulators and it works as expected. However, I wasn't able to confirm functionality below API 24 since I couldn't install lower API level emulators.