Files
simple-notes-sync/android
inventory69 0b143e5f0d fix: timeout increase (1s→10s) and locale hardcoded strings
## Changes:

### Timeout Fix (v1.7.2)
- SOCKET_TIMEOUT_MS: 1000ms → 10000ms for more stable connections
- Better error handling in hasUnsyncedChanges(): returns TRUE on error

### Locale Fix (v1.7.2)
- Replaced hardcoded German strings with getString(R.string.*)
- MainActivity, SettingsActivity, MainViewModel: 'Bereits synchronisiert' → getString()
- SettingsViewModel: Enhanced getString() with AppCompatDelegate locale support
- Added locale debug logging in MainActivity

### Code Cleanup
- Removed non-working VPN bypass code:
  - WiFiSocketFactory class
  - getWiFiInetAddressInternal() function
  - getOrCacheWiFiAddress() function
  - sessionWifiAddress cache variables
  - WiFi-binding logic in createSardineClient()
- Kept isVpnInterfaceActive() for logging/debugging

Note: VPN users should configure their VPN to exclude private IPs (e.g., 192.168.x.x)
for local server connectivity. App-level VPN bypass is not reliable on Android.
2026-02-02 17:14:23 +01:00
..

Simple Notes - Android App

🚧 Development Setup

Voraussetzungen

  • Android Studio Hedgehog (2023.1.1) oder neuer
  • JDK 17
  • Android SDK 34
  • Min SDK 24

Projekt in Android Studio öffnen

# In Android Studio:
# File → New → New Project
# Template: Empty Views Activity
# 
# Settings:
# Name: Simple Notes
# Package: com.example.simplenotes
# Save location: /home/liq/gitProjects/simple-notes-sync/android/
# Language: Kotlin
# Minimum SDK: API 24
# Build configuration: Kotlin DSL

Dependencies

Siehe ANDROID_GUIDE.md in project-docs für vollständige build.gradle.kts:

Hauptabhängigkeiten:

  • Sardine Android (WebDAV Client)
  • Kotlin Coroutines
  • Gson (JSON)
  • WorkManager (Background Sync)
  • Material Design Components

Projektstruktur

android/
└── app/
    └── src/
        └── main/
            ├── AndroidManifest.xml
            ├── java/com/example/simplenotes/
            │   ├── MainActivity.kt
            │   ├── NoteEditorActivity.kt
            │   ├── SettingsActivity.kt
            │   ├── models/
            │   │   ├── Note.kt
            │   │   └── SyncStatus.kt
            │   ├── storage/
            │   │   └── NotesStorage.kt
            │   ├── sync/
            │   │   ├── WebDavSyncService.kt
            │   │   ├── WifiSyncReceiver.kt
            │   │   ├── SyncWorker.kt
            │   │   └── ConflictResolver.kt
            │   ├── adapters/
            │   │   └── NotesAdapter.kt
            │   └── utils/
            │       ├── DeviceIdGenerator.kt
            │       ├── NotificationHelper.kt
            │       ├── Extensions.kt
            │       └── Constants.kt
            └── res/
                ├── layout/
                ├── values/
                └── drawable/

📖 Development Guide

Vollständige Code-Beispiele und Implementation:

🏗️ Build

# Debug Build
./gradlew assembleDebug

# Release Build
./gradlew assembleRelease

# Install on connected device
./gradlew installDebug

🧪 Testing

# Run unit tests
./gradlew test

# Run instrumented tests
./gradlew connectedAndroidTest

📝 TODO

  • Projekt in Android Studio erstellen
  • Dependencies einrichten
  • Models implementieren (Note.kt, SyncStatus.kt)
  • Storage Layer (NotesStorage.kt)
  • UI Layouts erstellen
  • Activities implementieren
  • Sync Service (WebDavSyncService.kt)
  • WLAN Detection (WifiSyncReceiver.kt)
  • WorkManager Setup (SyncWorker.kt)
  • Notifications (NotificationHelper.kt)
  • Error Handling
  • Testing

Next Step: Projekt in Android Studio erstellen und Code aus ANDROID_GUIDE.md übernehmen.