2.3 KiB
2.3 KiB
Update System
The rmtPocketWatcher Flutter app includes an automatic update checking system that monitors the Gitea repository for new releases.
How It Works
- Automatic Checks: The app checks for updates every 4 hours automatically
- Manual Checks: Users can manually check for updates using the refresh button in the title bar
- Version Comparison: Compares current app version (from pubspec.yaml) with latest release tag
- 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-x64.exe,rmtPocketWatcher-windows-x64.msi - macOS:
rmtPocketWatcher-macos.dmg - Linux:
rmtPocketWatcher-linux.appimage - Android:
rmtPocketWatcher-android.apk
- Windows:
Usage
The update system is automatically initialized when the app starts:
// In HomeScreen initState
context.read<UpdateProvider>().initialize();
context.read<UpdateProvider>().startPeriodicChecks();
Users will see:
- A notification banner when updates are available
- An update icon in the title bar (desktop)
- 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)