Files
rmtPocketWatcher/flutter_app/UPDATE_SYSTEM.md
HRiggs 110c5d99a1
Some checks failed
Flutter Release / get-version (push) Successful in 7s
Flutter Release / build-windows (push) Failing after 9s
Flutter Release / create-release (push) Has been cancelled
Flutter Release / build-android (push) Has been cancelled
Signing, Installer, New Workflows
2025-12-15 00:05:29 -05:00

60 lines
2.3 KiB
Markdown

# Update System
The rmtPocketWatcher Flutter app includes an automatic update checking system that monitors the Gitea repository for new releases.
## How It Works
1. **Automatic Checks**: The app checks for updates every 4 hours automatically
2. **Manual Checks**: Users can manually check for updates using the refresh button in the title bar
3. **Version Comparison**: Compares current app version (from pubspec.yaml) with latest release tag
4. **Platform Detection**: Automatically detects the appropriate download asset for the current platform
## Components
### UpdateService
- Fetches releases from Gitea RSS feed: `https://git.hudsonriggs.systems/LambdaBankingConglomerate/rmtPocketWatcher/releases.rss`
- Parses XML/RSS format to extract release information
- Compares version numbers and generates platform-specific download URLs
### UpdateProvider
- Manages update checking state and notifications
- Stores last check time and dismissed updates in SharedPreferences
- Provides reactive state for UI components
### UpdateNotificationBanner
- Shows a dismissible banner when updates are available
- Displays version information and release details
- Provides direct links to download or view release page
## Configuration
The system is configured to work with your Gitea repository structure:
- Repository: `LambdaBankingConglomerate/rmtPocketWatcher`
- RSS Feed: `https://git.hudsonriggs.systems/LambdaBankingConglomerate/rmtPocketWatcher/releases.rss`
- Release tags should follow semantic versioning (e.g., `v1.0.0`, `v1.2.3`)
- Expected asset naming convention:
- Windows: `rmtPocketWatcher-Windows-v{version}.zip`
- Android: `rmtPocketWatcher-Android-v{version}.apk`
- Future platforms can be added with similar naming patterns
## Usage
The update system is automatically initialized when the app starts:
```dart
// In HomeScreen initState
context.read<UpdateProvider>().initialize();
context.read<UpdateProvider>().startPeriodicChecks();
```
Users will see:
1. A notification banner when updates are available
2. An update icon in the title bar (desktop)
3. A detailed dialog with release notes and download options
## Privacy & Security
- Only checks public release information
- No personal data is transmitted
- Downloads are handled by the system browser/app store
- Users control when to update (no forced updates)