Skip to content

Conversation

Aniokrait
Copy link

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

  • Upgraded dependencies to adopt EdgeToEdge functionality
  • Modified CaptureActivity to properly handle edge-to-edge display

image

before after
before after

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.

- 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.
Comment on lines +12 to +14
plugins {
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
}
Copy link
Author

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">
Copy link
Author

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">
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant