- Replace character-based limit with byte-based limit using UTF-8 encoding
- QR codes are limited by bytes, not characters (1 char can be 1-4 bytes in UTF-8)
- Set limit to 2300 bytes (QR Code Version 40 with Error Correction Level M can hold ~2331 bytes)
- Update error logging to show both character count and byte size for debugging
- Apply fix to both PolycentricBackupActivity and QRCodeFullscreenActivity
This should now correctly handle strings with multi-byte characters and provide
accurate size validation for QR code generation.
- Correct QR code capacity limits for Error Correction Level M (15%)
- Update limit from 2900 to 2300 characters (actual M level capacity is ~2334)
- Add detailed error logging to show bundle length when QR generation fails
- Fix FileProvider authority to use dynamic string resource instead of hardcoded value
- Ensure consistent limits across both PolycentricBackupActivity and QRCodeFullscreenActivity
The previous limit was based on Error Correction Level L (7%) but we use Level M (15%),
which has a lower capacity but better error recovery.
- Add isContentSuitableForQRCode() helper function with 2900 character limit
- Check QR code size before attempting generation in both activities
- Prevent fullscreen QR viewer from launching when data is too large
- Use conservative 2900 character limit (vs theoretical 2953 max)
- Add size validation in both PolycentricBackupActivity and QRCodeFullscreenActivity
- Improve user experience by failing fast with clear error messages
This ensures QR codes are only generated when they have a reasonable
chance of success, and prevents unnecessary attempts to generate
QR codes that are too large for reliable scanning.
- Remove bitmap from Intent extras to prevent TransactionTooLargeException
- Pass only QR text through Intent and regenerate bitmap in fullscreen activity
- Add QR code generation logic to QRCodeFullscreenActivity
- Update createIntent method signature to only accept QR text
- Fixes crash when launching fullscreen QR viewer with large bitmaps
This resolves the 800KB+ data parcel size issue that was causing
the activity to fail to launch.
- Remove GZIP compression logic that was causing crashes
- Revert to simple QR code generation with single error correction level
- Add file export button when QR code is too large for scanning
- Add FileProvider configuration for sharing exported files
- Update string resources for new file export functionality
- Keep fullscreen QR code viewer for smaller profiles
This provides a more reliable solution: QR codes work for smaller profiles,
and file export handles large profiles that exceed QR code limits.
- Replace StateApp.instance.initializeFiles() with direct FragmentedStorage initialization
- Use SettingsActivity's own filesDir instead of relying on global context
- Add FragmentedStorage import to resolve compilation errors
- Prevents 'Attempted to use a global context while MainActivity is no longer available' error
This ensures SettingsActivity can initialize files independently without
depending on MainActivity's global context state.
- Add StateApp.instance.initializeFiles() calls before accessing Settings
- Fixes crash when SettingsActivity is launched before MainActivity
- Ensures FragmentedStorage is properly initialized before loading files
This prevents the 'Files dir should be initialized before loading a file'
error that was causing the SettingsActivity to crash on startup.
- Create QRCodeFullscreenActivity for large QR code display
- Add click listener to QR code image in PolycentricBackupActivity
- Add visual feedback with ripple effect and hint text
- Add localized strings for fullscreen hint
- Update layout to include hint text below QR code
- Add activity to AndroidManifest.xml
This makes it much easier to scan QR codes by providing
a fullscreen view when tapping the QR code image.
- Add GZIP compression for large export data (>2000 chars)
- Implement fallback QR generation with different error correction levels
- Add automatic decompression support in import functionality
- Improve error handling with fallback to text display
- Add localized error messages for QR code failures
- Add compression ratio logging for debugging
This fixes the 'Data too big' error when generating QR codes for
polycentric profile exports by automatically compressing large data
and providing multiple fallback mechanisms.
reproduction steps
- play a video
- swipe home to enter PiP
- minimize the video and then close it with the X
- swipe home (PiP will launch even though it shouldn't because nothing is playing)
Changelog: changed