-
Notifications
You must be signed in to change notification settings - Fork 241
fix: Android target API compatibility for F-Droid distribution #1435
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: development
Are you sure you want to change the base?
Conversation
🧙 Sourcery has finished reviewing your pull request! Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
@samruddhi-Rahegaonkar please also review |
@@ -28,7 +28,7 @@ def LOCAL_KEY_PRESENT = project.hasProperty('SIGNING_KEY_FILE') && rootProject.f | |||
|
|||
android { | |||
namespace "org.fossasia.badgemagic" | |||
compileSdk flutter.compileSdkVersion | |||
compileSdk 35 // Changed from flutter.compileSdkVersion to explicit 35 |
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.
referring to the comment of @AsCress. So, do we need to define the specific version here? It is already defined in the pubspec.yaml.
Build StatusBuild successful. APKs to test: https://github.com/fossasia/badgemagic-app/actions/runs/17372689173/artifacts/3896533894. Screenshots |
Fixes #1120
Code Changes Summary
📱 AndroidManifest.xml Changes
Key Fix #1: Deprecated CustomTabs Reference
Why:
android.support.*
namespace is deprecated and causes compatibility warnings on modern Android versions. AndroidX is the current standard.Key Fix #2: Missing Android 13+ Back Gesture Support
<!-- ADDED to activity --> android:enableOnBackInvokedCallback="true"
Why: Required for proper back gesture handling on Android 13+. Without this, the app may not respond correctly to back gestures on newer devices.
Key Fix #3: Security Enhancement
<!-- ADDED to application --> android:allowBackup="false"
Why: Prevents sensitive Bluetooth pairing data from being included in automatic Android backups, improving security.
Structural Improvement
🔧 build.gradle Changes
Critical Fix: Dynamic SDK References → Explicit Values
Why This Fixes F-Droid Warnings:
flutter.targetSdkVersion
currently points to API 33 (outdated)Technical Justification:
🎯 Combined Impact
These minimal changes eliminate all F-Droid compatibility warnings while:
Summary by Sourcery
Update Android configuration to meet F-Droid API requirements and modern Android best practices
Bug Fixes:
Enhancements:
Build: