Commit Graph

1514 Commits

Author SHA1 Message Date
Trevor 6e58107a5e Fix QR code size validation to use byte count instead of character count
- 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.
2025-08-19 11:19:11 -05:00
Trevor 79f478e421 Fix QR code size limits and add better error logging
- 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.
2025-08-19 11:13:45 -05:00
Trevor a20ebd49a4 Add proactive QR code size validation and checks
- 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.
2025-08-19 10:59:16 -05:00
Kelvin 66f8711055 Fix login warnings working on redirects 334 2025-08-19 17:52:14 +02:00
Trevor 31f0109438 Fix TransactionTooLargeException in QRCodeFullscreenActivity
- 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.
2025-08-19 10:29:16 -05:00
Kelvin b7c123c281 Refs 333 2025-08-19 16:45:57 +02:00
Kelvin 9481bbf3f1 Vod chat button fix, default settings in devportal 2025-08-19 16:42:17 +02:00
Trevor bbd9ba0a0a fixd import 2025-08-18 16:02:29 -05:00
Kelvin 43ec7e821b Refs 332 2025-08-18 21:31:49 +02:00
Trevor bc67f4c486 Simplify Polycentric profile export with file export option
- 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.
2025-08-18 14:26:25 -05:00
Kelvin ca3454afbe Login warning fixes, uimod (disabled) 2025-08-18 19:35:12 +02:00
Kelvin 1edc8aabf8 Fix login dialog 2025-08-15 21:20:23 +02:00
Kelvin 91060faac9 VOD chat 2025-08-15 16:36:38 +02:00
Kelvin 17027ba364 Remote history sync on toggle 2025-08-14 21:03:39 +02:00
Kelvin 8569eaa5db Hide DevSubmit filter 2025-08-14 20:36:56 +02:00
Kelvin d32d817e0a Merge branch 'shorts-improv' into 'master'
Fix background play, disable artwork on background till improved, renamed...

See merge request videostreaming/grayjay!140
2025-08-14 11:26:47 +00:00
Kelvin a0f4cc760c Fix background play, disable artwork on background till improved, renamed variable that caused confusion 2025-08-14 12:35:46 +02:00
Kelvin 5247997ea5 Set plugin install request timeouts, fix messaging surrounding downloading icons 2025-08-13 19:36:26 +02:00
Trevor c862b60c71 Fix SettingsActivity crash by using local context instead of global context
- 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.
2025-08-13 12:16:26 -05:00
Trevor 1524687f75 Fix SettingsActivity crash when files directory not initialized
- 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.
2025-08-13 12:10:40 -05:00
Trevor cb74e82fa1 Add fullscreen QR code viewer for easier scanning
- 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.
2025-08-13 11:59:56 -05:00
Trevor 4b3e89d0af Fix QR code generation for large polycentric export bundles
- 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.
2025-08-13 11:34:56 -05:00
Kelvin 453030d561 Merge branch 'shorts-improv' into 'master'
Various shorts improvements, login warnings support, etc

See merge request videostreaming/grayjay!138
331
2025-08-13 16:11:30 +00:00
Kelvin e080702a52 Fix dislike color 2025-08-13 17:56:27 +02:00
Kelvin 3909343adc Pre-generate support shorts, subtitle size, short like/dislike color 2025-08-13 00:23:54 +02:00
Kelvin dc76934d0e Add explicit long type for dash dwonload length 2025-08-12 17:05:54 +02:00
Kelvin 6cf47d592a Various shorts improvements, login warnings support, etc 2025-08-12 02:03:04 +02:00
Kai 1507c70729 fix https://github.com/futo-org/grayjay-android/issues/2585
Changelog: changed
2025-08-11 16:45:03 -04:00
Kai d6a23ac0de fix PiP issue
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
2025-08-11 14:48:23 -05:00
koen-futo 17df396672 Merge pull request #2597 from alpqn/patch-1
Fix typos
2025-08-11 10:56:28 +02:00
quonverbat 0c5ba0cd39 Fix typos 2025-08-10 16:22:56 +03:00
Koen 183aeb18a0 Merge branch 'plugin-add-mixcloud' into 'master'
Add mixcloud plugin

See merge request videostreaming/grayjay!137
2025-08-07 08:00:16 +00:00
Stefan 8d08e19cd2 Add mixcloud plugin 2025-08-07 08:00:17 +01:00
Kelvin a882d04d26 Merge branch 'master' of gitlab.futo.org:videostreaming/grayjay 2025-08-01 21:56:00 +02:00
Kelvin c4d06c1ba2 Hide sync ui, thumbnails nullable 2025-08-01 21:55:47 +02:00
Trevor 31a34e4583 Merge branch 'master' into ts/polycentric-moderation 2025-08-01 10:14:16 -05:00
Trevor 19b96c2ea1 Merge branch 'master' of gitlab.futo.org:videostreaming/grayjay 2025-08-01 10:13:19 -05:00
Trevor 545ece59ad fix for new server backfill 2025-08-01 10:13:06 -05:00
Kelvin 4dfcd47901 Merge branch 'fix-null-thumbnails-error' into 'master'
fix: erroring out when thumbnails are null which causes sync to reset

See merge request videostreaming/grayjay!136
2025-07-31 16:37:29 +00:00
zvonimir 4c0c1abb4b fix: erroring out when thumbnails are null which causes sync to reset 2025-07-31 18:34:24 +02:00
Kelvin 6f44071186 Merge branch 'update-docs' into 'master'
docs: add section for Request Modifiers in Content types document

See merge request videostreaming/grayjay!134
2025-07-31 14:00:17 +00:00
Stefan 29910a2698 docs: add section for Request Modifiers in Content types document 2025-07-31 14:00:17 +00:00
Kelvin b5da0d4462 Merge branch 'master' of gitlab.futo.org:videostreaming/grayjay 2025-07-30 18:22:27 +02:00
Kelvin 99fb9b3462 VOD chat support 2025-07-30 18:22:15 +02:00
Koen J 5f0a89d13b Implemented URLs open outside of live chat webview. 2025-07-30 13:46:46 +02:00
Koen f311561e6f Merge branch 'fix-android-anr-swap-sources' into 'master'
Fix Android ANR in SwapSources.

See merge request videostreaming/grayjay!135
2025-07-29 09:51:15 +00:00
Koen J 2fc944ddd9 Cleanup. 2025-07-29 11:15:49 +02:00
Koen J a2970b86ee Fixed issue where Scan QR button vanishes due to missing owner activity and fixed issue where remembered devices do not show until at least one normal device is found. 2025-07-29 10:58:41 +02:00
Kelvin ac9a51f105 Merge branch 'master' of gitlab.futo.org:videostreaming/grayjay 2025-07-29 01:39:48 +02:00
Kelvin 90dca2537a getUserHistory support 2025-07-29 01:39:32 +02:00