31 Commits

Author SHA1 Message Date
87764cc15b Add ability to clear selected file in upload tab
- Add clearSelectedFile() function to MainViewModel
- Auto-clear selected file after successful upload
- Add remove button (X) to selected file card in GeneralUploadTab
2025-12-27 23:05:25 -05:00
eff3478a97 Fix ANR during chunked uploads and file compression
Major Changes:
- Convert ChunkedUploadManager.java to Kotlin with coroutines
- Convert ZipUtil.java to Kotlin with Dispatchers.IO
- Convert FileController.java to Kotlin

ANR Fixes:
- All file I/O now runs on Dispatchers.IO (prevents main thread blocking)
- Chunk reading (4-10MB) moved to background thread
- File compression (zipping) moved to background thread
- Instant cancellation with proper coroutine handling

Chunking Improvements:
- Update thresholds to match chunk sizes (4MB mobile, 10MB WiFi)
- Files smaller than chunk size use standard upload
- Proper zipping logic: skip single .zip files, zip everything else

Progress & UX:
- Add PREPARING state for file compression phase
- Show 'Compressing file: X%' in notification during zip
- Throttle updates to 500ms for smooth notification display
- Broadcast ACTION_ZIP_PROGRESS for in-app UI
- ViewModel listens and displays zip progress
- Cancel button visible and functional during all phases

Cancellation:
- Instant cancel during zipping (checks every 8KB)
- Clean cancellation using CancellationException
- Automatic cleanup of partial zip files
- No error logs for user-initiated cancellation

Files Changed:
- ChunkedUploadManager: Java → Kotlin, uses coroutines + Dispatchers.IO
- ZipUtil: Java → Kotlin, cancellable with progress throttling
- FileController: Java → Kotlin, proper async job management
- UploadStrategySelector: Updated chunk size thresholds
- FileUploadForegroundService: Added PREPARING state, zip progress handling
- MainViewModel: Listen for ACTION_ZIP_PROGRESS, display status
- AppConstants: Added ACTION_ZIP_PROGRESS constant
2025-12-27 22:56:07 -05:00
04b3bea454 Add configurable parallel uploads and improve chunk upload settings
- Add parallel uploads toggle in settings (experimental, disabled by default)
- Increase mobile chunk size from 2MB to 4MB
- Configure parallel uploads: 3 chunks on WiFi, 2 on mobile (if enabled), 1 sequential (if disabled)
- Fix progress tracking when retrying missing chunks (subtract bytes to prevent >100%)
2025-12-27 22:20:01 -05:00
41363028aa Fix general upload tab file selection
- Implement URI to File conversion using FileController.saveContentUriToFile()
- Properly extract filename from URI using ContentResolver
- Store actual File object instead of null, enabling uploads to work
2025-12-27 22:12:19 -05:00
d40814ec4c Add pause, resume, and cancel controls for uploads
- Add pause/resume/cancel actions to notification bar
- Add pause/resume/cancel buttons to in-app upload progress card
- Track upload state (paused, uploading, cancelled) and upload type (chunked vs standard)
- Chunked uploads support pause/resume, standard uploads only support cancel
- Fix notification to persist cancelled state without flickering
2025-12-27 22:09:14 -05:00
c80d523972 Add multi-file zip upload and persistent upload state tracking
- Implement automatic zipping when multiple dumpstate files are selected
  - Single file uploads directly (preserves existing behavior)
  - Multiple files are zipped with timestamp naming (e.g., dumpstates_20251227_205530.zip)
  - Zip files stored in cache directory and cleaned up after upload completes or on error

- Add upload progress persistence across app restarts
  - Track upload state in SharedPreferences to detect ongoing uploads
  - ViewModel checks for in-progress uploads on initialization and shows loading state
  - Fixes crash when reopening app during upload by properly maintaining state

- Improve upload completion notification
  - Display upload code in notification text (e.g., "Upload complete! Code: ABC123")
  - Use stopForeground(STOP_FOREGROUND_DETACH) to keep notification visible after service stops
  - Notification persists until user dismisses it, ensuring code is always visible
2025-12-27 21:05:26 -05:00
e7335977c0 Add persistent upload progress indicator across all tabs
- Add progress broadcast from service to ViewModel with bytes and percentage
- Display global progress bar above tab content in MainScreen
- Show upload progress (MB uploaded/total, percentage) persistently
- Remove redundant in-tab progress indicators
- Progress stays visible when switching between Upload and Dumpstate tabs
- Matches cloud storage app UX (Google Drive, Dropbox)
2025-12-27 20:46:04 -05:00
4557d13064 Refactor upload architecture and fix Android 14+ notification delay
- Convert UploadController, FileUploadForegroundService, and UploadHistory from Java to Kotlin
- Move all upload logic from UploadController into FileUploadForegroundService for better encapsulation
- Service now directly manages ChunkedUploadManager instances instead of delegating to controller
- Add FOREGROUND_SERVICE_IMMEDIATE flag to bypass Android 14+ notification display delay (up to 10s for DATA_SYNC services)
- Add notification update logging for better debugging
- Simplify UploadController to only handle service launching and server file deletion

Fixes notification appearing late during uploads (was showing around 70% progress instead of immediately).
2025-12-27 20:28:16 -05:00
4ac3114064 Add integrated onboarding carousel with permissions and server setup
Replaces separate welcome and server setup screens with a unified 5-page
onboarding carousel that guides users through:
- App introduction and backend requirements
- Notification permission with explanation
- All files access permission with explanation
- Server configuration (address, port, key) with QR scanning
- Completion confirmation

Also adds notification permission checks before uploads to ensure upload
progress notifications can be displayed. Users are prompted for permission
if not already granted, then upload proceeds automatically.

Changes:
- Create OnboardingScreen.kt with 5-page carousel flow
- Add onboarding completion tracking to PreferencesUtil
- Update navigation to show onboarding on first launch
- Add notification permission checks to upload tabs
- Add roundIcon attribute to manifest for better icon display
2025-12-27 19:43:49 -05:00
836c870204 Force QR scanner to portrait orientation
Override the ZXing CaptureActivity orientation in the manifest to force portrait mode, preventing the scanner from switching to landscape mode.
2025-12-27 19:22:04 -05:00
67e26a095c Obfuscate client key field as password with visibility toggle
Add password masking to the client key field for better security. Users can toggle visibility using an eye icon button to view or hide the key as needed.
2025-12-27 19:19:09 -05:00
0b3d16f974 Move QR scan button below server configuration fields
Reposition the QR code scan button to appear immediately after the server configuration fields (address, port, and client key) that it populates, improving the logical flow and making it clearer what the button does.
2025-12-27 19:17:48 -05:00
a79ccf8f00 Improve upload parameters dialog to make fields clearly editable
Add visual cues and instructions to clarify that upload parameter fields can be edited:
- Add instructional text at top of dialog
- Add edit icons to both text fields
- Update labels to include "(tap to edit)" hint
- Change placeholders to action-oriented text
- Auto-focus first field to show keyboard immediately
- Add keyboard actions for better navigation
2025-12-27 19:17:04 -05:00
e60cdf9355 Add configurable upload parameter defaults with optional prompt
Users can now set default upload parameters (max downloads and expiry hours) in settings and choose whether to show the upload parameters dialog or use saved defaults directly.

Changes:
- Add upload preferences: default max downloads, default expiry hours, and ask before upload toggle
- Update SettingsScreen with new upload defaults section
- Modify UploadParamsDialog to initialize with saved defaults instead of hardcoded values
- Update DumpstateTab and GeneralUploadTab to check askBeforeUpload preference and bypass dialog when disabled
2025-12-27 19:14:24 -05:00
d9052454fe Fix storage permission flow to direct user to settings
- Replace READ_EXTERNAL_STORAGE permission with all files access check
- Open app settings when permission is needed so user can grant it
- Check permission status when returning from settings
- Launch file picker automatically if permission is granted
2025-12-27 18:58:58 -05:00
4a7a48c9a4 Remove legacy XML UI code after Compose migration 2025-12-27 18:55:54 -05:00
2c8315cb5d Migrate UI to Jetpack Compose with Material 3 design
- Replace XML layouts with Compose screens for all 5 Activities
- Implement Material 3 theme with Google Blue/Green color scheme matching app icon
- Add device-aware navigation with bottom tabs for Samsung devices
- Remove action bar for modern edge-to-edge UI design
- Update Kotlin to 1.9.22 for Compose Compiler compatibility
- Add Compose dependencies and configure build system
- Implement MainViewModel for upload state management
- Create reusable dialog components for upload parameters and results
- Preserve all existing Java controllers and services (UI-only migration)
2025-12-27 18:47:29 -05:00
0872fcdfb2 Bump version to 25.12.1 for December 2025 release 2025-12-27 15:11:31 -05:00
0e08718566 Add QR code scanning for server configuration
Adds QR code scanning functionality to both ServerSetupActivity and
SettingsActivity, allowing users to auto-fill server configuration by
scanning a QR code from the server's admin dashboard.

Changes:
- Add ZXing Android Embedded library (v4.3.0) for QR scanning
- Add CAMERA permission to AndroidManifest
- Create QrServerConfig model to parse and validate QR JSON data
- Create QrScannerUtil for shared scanning functionality
- Extend PermissionUtil with camera permission handling
- Add "Scan QR Code" button to ServerSetupActivity with hint text
- Add "Scan QR Code" button to SettingsActivity
- Add QR scan icon and string resources
- Configure Gradle Java toolchain auto-detection

The QR code contains JSON with server address, port, and client key
which are automatically populated into the input fields when scanned.
2025-12-27 14:49:01 -05:00
d32fd4690d adding first iteration of chunked file support 2025-04-16 21:41:07 -04:00
76b93e3363 fixing issue: Client-Key shown in plain text in the logs #2 2025-04-16 20:11:35 -04:00
59d3518a4c getting ready for github roleout 2025-04-15 20:58:51 -04:00
111ac2ee94 support deleting files from the app and specify upload params 2025-04-15 18:35:47 -04:00
418520c000 multi file and multi dumpstate support 2025-04-15 13:15:47 -04:00
2e4d02b503 cleaning up UI 2025-04-15 12:36:18 -04:00
89cda0d210 fix bug in header name 2025-04-15 11:51:34 -04:00
0c04500fc2 adding setup workflow 2025-04-15 09:57:51 -04:00
e36d0616d5 adding settings screen 2025-04-15 09:52:20 -04:00
b8afe35dfc refactoring and adding a history 2025-04-14 22:37:20 -04:00
45dc412cb7 removed tinyurl logic added support for new short code logic 2025-04-14 21:37:18 -04:00
44cbf409b7 initial commit 2024-10-07 22:47:30 -04:00