🐛 Release v1.1.1 - Critical Bugfixes
✅ Server-Erreichbarkeits-Check vor jedem Sync - Socket-Check mit 2s Timeout (DHCP/Routing-Init abwarten) - Verhindert Fehler-Notifications in fremden WiFi-Netzen - Verhindert Fehler bei Netzwerk-Initialisierung (WiFi-Connect) - Stiller Abbruch wenn Server nicht erreichbar - 80% schnellerer Abbruch: 2s statt 10+ Sekunden 🔧 Notification-Verbesserungen - Alte Notifications werden beim App-Start gelöscht - Fehler-Notifications verschwinden automatisch nach 30s - Bessere Batterie-Effizienz 📱 UI-Bugfixes - Sync-Icon nur anzeigen wenn Sync konfiguriert ist - Swipe-to-Delete: Kein Flackern mehr bei schnellem Löschen - Scroll-to-Top nach Note Save (ListAdapter async fix) 📡 Sync-Architektur Dokumentation - SYNC_ARCHITECTURE.md mit allen 4 Sync-Triggern - DOCS.md + DOCS.en.md aktualisiert - GitHub Actions: F-Droid Changelogs statt Commit-Messages 🎯 Testing: BUGFIX_SPURIOUS_SYNC_ERROR_NOTIFICATIONS.md 📦 Version: 1.1.1 (versionCode=3)
This commit is contained in:
59
DOCS.en.md
59
DOCS.en.md
@@ -118,7 +118,61 @@ fun isInHomeNetwork(): Boolean {
|
||||
|
||||
---
|
||||
|
||||
## 🔋 Battery Optimization
|
||||
## <EFBFBD> Sync Trigger Overview
|
||||
|
||||
The app uses **4 different sync triggers** with different use cases:
|
||||
|
||||
| Trigger | File | Function | When? | Pre-Check? |
|
||||
|---------|------|----------|-------|------------|
|
||||
| **1. Manual Sync** | `MainActivity.kt` | `triggerManualSync()` | User clicks sync button in menu | ✅ Yes |
|
||||
| **2. Auto-Sync (onResume)** | `MainActivity.kt` | `triggerAutoSync()` | App opened/resumed | ✅ Yes |
|
||||
| **3. Background Sync (Periodic)** | `SyncWorker.kt` | `doWork()` | Every 15/30/60 minutes (configurable) | ✅ Yes |
|
||||
| **4. WiFi-Connect Sync** | `NetworkMonitor.kt` → `SyncWorker.kt` | `triggerWifiConnectSync()` | WiFi enabled/SSID changed | ✅ Yes |
|
||||
|
||||
### Server Reachability Check (Pre-Check)
|
||||
|
||||
**All 4 sync triggers** use a **pre-check** before the actual sync:
|
||||
|
||||
```kotlin
|
||||
// WebDavSyncService.kt - isServerReachable()
|
||||
suspend fun isServerReachable(): Boolean = withContext(Dispatchers.IO) {
|
||||
return@withContext try {
|
||||
Socket().use { socket ->
|
||||
socket.connect(InetSocketAddress(host, port), 2000) // 2s Timeout
|
||||
}
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
Logger.d(TAG, "Server not reachable: ${e.message}")
|
||||
false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Why Socket Check instead of HTTP Request?**
|
||||
- ⚡ **Faster:** Socket connect is instant, HTTP request takes longer
|
||||
- 🔋 **Battery Efficient:** No HTTP overhead (headers, TLS handshake, etc.)
|
||||
- 🎯 **More Precise:** Only checks network reachability, not server logic
|
||||
- 🛡️ **Prevents Errors:** Detects foreign WiFi networks before sync error occurs
|
||||
|
||||
**When does the check fail?**
|
||||
- ❌ Server offline/unreachable
|
||||
- ❌ Wrong WiFi network (e.g. public café WiFi)
|
||||
- ❌ Network not ready yet (DHCP/routing delay after WiFi connect)
|
||||
- ❌ VPN blocks server access
|
||||
- ❌ No WebDAV server URL configured
|
||||
|
||||
### Sync Behavior by Trigger Type
|
||||
|
||||
| Trigger | When server not reachable | On successful sync | Throttling |
|
||||
|---------|--------------------------|-------------------|------------|
|
||||
| Manual Sync | Toast: "Server not reachable" | Toast: "✅ Synced: X notes" | None |
|
||||
| Auto-Sync (onResume) | Silent abort (no toast) | Toast: "✅ Synced: X notes" | Max. 1x/min |
|
||||
| Background Sync | Silent abort (no toast) | Silent (LocalBroadcast only) | 15/30/60 min |
|
||||
| WiFi-Connect Sync | Silent abort (no toast) | Silent (LocalBroadcast only) | SSID-based |
|
||||
|
||||
---
|
||||
|
||||
## <20>🔋 Battery Optimization
|
||||
|
||||
### Usage Analysis
|
||||
|
||||
@@ -466,9 +520,10 @@ androidx.localbroadcastmanager:localbroadcastmanager:1.1.0
|
||||
## 📖 Further Documentation
|
||||
|
||||
- [Project Docs](https://github.com/inventory69/project-docs/tree/main/simple-notes-sync)
|
||||
- [Sync Architecture](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/SYNC_ARCHITECTURE.md) - **Detailed Sync Trigger Documentation**
|
||||
- [Android Guide](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/ANDROID_GUIDE.md)
|
||||
- [Bugfix Documentation](https://github.com/inventory69/project-docs/blob/main/simple-notes-sync/BUGFIX_SYNC_SPAM_AND_NOTIFICATIONS.md)
|
||||
|
||||
---
|
||||
|
||||
**Last updated:** December 21, 2025
|
||||
**Last updated:** December 25, 2025
|
||||
|
||||
Reference in New Issue
Block a user