🚀 feat: Production release preparation with GitHub Actions deployment

## Major Features
-  Battery optimized auto-sync (30 min interval, ~0.4%/day)
-  BuildConfig.DEBUG conditional logging (Logger.kt)
-  Settings UI cleanup (SSID field removed)
-  Interactive notifications (click opens app)
-  Post-reboot auto-sync (BootReceiver)
-  GitHub Actions deployment workflow

## Implementation Details

### Auto-Sync Architecture
- WorkManager PeriodicWorkRequest (30 min intervals)
- Gateway IP detection via network interface enumeration
- Smart sync only when on home network
- BootReceiver restarts monitoring after device reboot

### Logging System
- Logger.kt object with BuildConfig.DEBUG checks
- Debug logs only in DEBUG builds
- Error/warning logs always visible
- All components updated (NetworkMonitor, SyncWorker, WebDavSyncService, etc.)

### UI Improvements
- Removed confusing SSID field from Settings
- Gateway detection fully automatic
- Material Design 3 info boxes
- Cleaner, simpler user interface

### Notifications
- PendingIntent opens MainActivity on click
- setAutoCancel(true) for auto-dismiss
- Broadcast receiver for UI refresh on sync

### GitHub Actions
- Automated APK builds on push to main
- Signed releases with proper keystore
- 3 APK variants (universal, arm64-v8a, armeabi-v7a)
- Semantic versioning: YYYY.MM.DD + build number
- Comprehensive release notes with installation guide

## Documentation
- README.md: User-friendly German guide
- DOCS.md: Technical architecture documentation
- GITHUB_ACTIONS_SETUP.md: Deployment setup guide

## Build Configuration
- Signing support via key.properties
- APK splits for smaller downloads
- ProGuard enabled with resource shrinking
- BuildConfig generation for DEBUG flag
This commit is contained in:
inventory69
2025-12-21 11:09:29 +01:00
parent 933646f28b
commit 7e277e7fb9
19 changed files with 1866 additions and 562 deletions

View File

@@ -1,7 +1,7 @@
package dev.dettmer.simplenotes
import android.app.Application
import android.util.Log
import dev.dettmer.simplenotes.utils.Logger
import dev.dettmer.simplenotes.sync.NetworkMonitor
import dev.dettmer.simplenotes.utils.NotificationHelper
@@ -11,31 +11,34 @@ class SimpleNotesApplication : Application() {
private const val TAG = "SimpleNotesApp"
}
private lateinit var networkMonitor: NetworkMonitor
lateinit var networkMonitor: NetworkMonitor // Public access für SettingsActivity
override fun onCreate() {
super.onCreate()
Log.d(TAG, "🚀 Application onCreate()")
Logger.d(TAG, "🚀 Application onCreate()")
// Initialize notification channel
NotificationHelper.createNotificationChannel(this)
Log.d(TAG, "✅ Notification channel created")
Logger.d(TAG, "✅ Notification channel created")
// Initialize and start NetworkMonitor at application level
// CRITICAL: Use applicationContext, not 'this'!
// Initialize NetworkMonitor (WorkManager-based)
// VORTEIL: WorkManager läuft auch ohne aktive App!
networkMonitor = NetworkMonitor(applicationContext)
// Start WorkManager periodic sync
// Dies läuft im Hintergrund auch wenn App geschlossen ist
networkMonitor.startMonitoring()
Log.d(TAG, "NetworkMonitor initialized and started")
Logger.d(TAG, "WorkManager-based auto-sync initialized")
}
override fun onTerminate() {
super.onTerminate()
Log.d(TAG, "🛑 Application onTerminate()")
Logger.d(TAG, "🛑 Application onTerminate()")
// Clean up NetworkMonitor when app is terminated
networkMonitor.stopMonitoring()
// WorkManager läuft weiter auch nach onTerminate!
// Nur bei deaktiviertem Auto-Sync stoppen wir es
}
}